Debian Codegraph @

debian/patches/Bug-1983713-Use-non-deprecated-ast-value.-r-firefox-build.patch

raw
1 From: Mike Hommey <[email protected]>
2 Date: Tue, 19 Aug 2025 05:08:34 +0000
3 Subject: Bug 1983713 - Use non-deprecated ast value.
4 r=firefox-build-system-reviewers,nalexander,ahochheiden
5
6 ast.Str was deprecated in python 3.12 and removed in 3.14. It inherited
7 from ast.Constant, `Str.s` was equivalent to `Constant.value`, so we can
8 use the latter on both old and newer python versions.
9
10 Differential Revision: https://phabricator.services.mozilla.com/D261511
11
12 (cherry picked from commit e6db063cdccce8ace1fc7f7bc881175f9d10b255)
13
14 Origin: upstream, 144.0
15 ---
16 python/mach/mach/command_util.py | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 diff --git a/python/mach/mach/command_util.py b/python/mach/mach/command_util.py
20 index e94f477..14bf65d 100644
21 --- a/python/mach/mach/command_util.py
22 +++ b/python/mach/mach/command_util.py
23 @@ -292,7 +292,7 @@ class DecoratorVisitor(ast.NodeVisitor):
24 kwarg_dict = {}
25
26 for name, arg in zip(["command", "subcommand"], decorator.args):
27 - kwarg_dict[name] = arg.s
28 + kwarg_dict[name] = arg.value
29
30 for keyword in decorator.keywords:
31 if keyword.arg not in relevant_kwargs: