| 1 |
From: Alex Hochheiden <[email protected]> |
| 2 |
Date: Wed, 15 Oct 2025 05:42:37 +0000 |
| 3 |
Subject: Bug 1993797 - Fix AST parsing in DecoratorVisitor for Python 3.14 |
| 4 |
r=firefox-build-system-reviewers,glandium |
| 5 |
|
| 6 |
This is necessary due to the `ast.Str` removal in 3.14. |
| 7 |
|
| 8 |
Differential Revision: https://phabricator.services.mozilla.com/D268646 |
| 9 |
|
| 10 |
(cherry picked from commit 4a8e9c0b1b6924f734c90486790a7c011faeda84) |
| 11 |
|
| 12 |
Origin: upstream 146.0 |
| 13 |
--- |
| 14 |
python/mach/mach/command_util.py | 2 +- |
| 15 |
1 file changed, 1 insertion(+), 1 deletion(-) |
| 16 |
|
| 17 |
diff --git a/python/mach/mach/command_util.py b/python/mach/mach/command_util.py |
| 18 |
index 44e13f1..e94f477 100644 |
| 19 |
--- a/python/mach/mach/command_util.py |
| 20 |
+++ b/python/mach/mach/command_util.py |
| 21 |
@@ -299,7 +299,7 @@ class DecoratorVisitor(ast.NodeVisitor): |
| 22 |
# We only care about these 3 kwargs, so we can safely skip the rest |
| 23 |
continue |
| 24 |
|
| 25 |
- kwarg_dict[keyword.arg] = getattr(keyword.value, "s", "") |
| 26 |
+ kwarg_dict[keyword.arg] = keyword.value.value |
| 27 |
|
| 28 |
command = kwarg_dict.pop("command") |
| 29 |
self.results.setdefault(command, {}) |