File: python-3.14-fix-ast-attributes.patch

package info (click to toggle)
rally-openstack 3.0.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,968 kB
  • sloc: python: 53,131; sh: 262; makefile: 38
file content (30 lines) | stat: -rw-r--r-- 1,265 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: Fix AST attributes
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: https://bugs.debian.org/1123462
Forwarded: no
Last-Update: 2025-12-30

Index: rally-openstack/tests/unit/test_mock.py
===================================================================
--- rally-openstack.orig/tests/unit/test_mock.py
+++ rally-openstack/tests/unit/test_mock.py
@@ -114,16 +114,16 @@ class FuncMockArgsDecoratorsChecker(ast.
         """
         val = None
         if isinstance(node, ast.Constant):
-            val = node.s
+            val = node.value
         elif isinstance(node, ast.BinOp):
             if pairwise_isinstance(
                     (node.op, ast.Mod), (node.left, ast.Constant),
                     (node.right, ast.Name)):
-                val = node.left.s % self.globals_[node.right.id]
+                val = node.left.value % self.globals_[node.right.id]
             elif pairwise_isinstance(
                     (node.op, ast.Add), (node.left, ast.Name),
                     (node.right, ast.Constant)):
-                val = self.globals_[node.left.id] + node.right.s
+                val = self.globals_[node.left.id] + node.right.value
         elif isinstance(node, ast.Name):
             val = self.globals_[node.id]