Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mozjs-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "mozjs_sys"
description = "System crate for the Mozilla SpiderMonkey JavaScript engine."
repository.workspace = true
version = "0.140.5-5"
version = "0.140.5-6"
authors = ["Mozilla", "The Servo Project Developers"]
links = "mozjs"
license.workspace = true
Expand Down
62 changes: 62 additions & 0 deletions mozjs-sys/etc/patches/0045-python-deprecated.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
diff --git a/python/mozbuild/mozbuild/frontend/reader.py b/python/mozbuild/mozbuild/frontend/reader.py
index 9f6292cb909de..89bf9995c1768 100644
--- a/python/mozbuild/mozbuild/frontend/reader.py
+++ b/python/mozbuild/mozbuild/frontend/reader.py
@@ -470,7 +470,7 @@ def c(new_node):
return c(
ast.Subscript(
value=c(ast.Name(id=self._global_name, ctx=ast.Load())),
- slice=c(ast.Index(value=c(ast.Str(s=node.id)))),
+ slice=c(ast.Index(value=c(ast.Constant(value=node.id)))),
ctx=node.ctx,
)
)
@@ -1039,8 +1039,8 @@ def assigned_variable(node):
else:
# Others
assert isinstance(target.slice, ast.Index)
- assert isinstance(target.slice.value, ast.Str)
- key = target.slice.value.s
+ assert isinstance(target.slice.value, ast.Constant)
+ key = target.slice.value.value
elif isinstance(target, ast.Attribute):
assert isinstance(target.attr, str)
key = target.attr
@@ -1051,11 +1051,11 @@ def assigned_values(node):
value = node.value
if isinstance(value, ast.List):
for v in value.elts:
- assert isinstance(v, ast.Str)
- yield v.s
+ assert isinstance(v, ast.Constant)
+ yield v.value
else:
- assert isinstance(value, ast.Str)
- yield value.s
+ assert isinstance(value, ast.Constant)
+ yield value.value

assignments = []

diff --git a/python/mozbuild/mozbuild/vendor/rewrite_mozbuild.py b/python/mozbuild/mozbuild/vendor/rewrite_mozbuild.py
index cfcc0f18b9a9a..de06b58819b6a 100644
--- a/python/mozbuild/mozbuild/vendor/rewrite_mozbuild.py
+++ b/python/mozbuild/mozbuild/vendor/rewrite_mozbuild.py
@@ -327,15 +327,13 @@ def assignment_node_to_source_filename_list(code, node):
"""
if isinstance(node.value, ast.List) and "elts" in node.value._fields:
for f in node.value.elts:
- if not isinstance(f, ast.Constant) and not isinstance(f, ast.Str):
+ if not isinstance(f, ast.Constant):
log(
"Found non-constant source file name in list: ",
ast_get_source_segment(code, f),
)
return []
- return [
- f.value if isinstance(f, ast.Constant) else f.s for f in node.value.elts
- ]
+ return [f.value for f in node.value.elts]
elif isinstance(node.value, ast.ListComp):
# SOURCES += [f for f in foo if blah]
log("Could not find the files for " + ast_get_source_segment(code, node.value))
14 changes: 7 additions & 7 deletions mozjs-sys/mozjs/python/mozbuild/mozbuild/frontend/reader.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading