Debian Codegraph @

debian/patches/70b389d5e7c6454d4cadcc83cd1fdfd45c7f543f.patch

raw
1 From 70b389d5e7c6454d4cadcc83cd1fdfd45c7f543f Mon Sep 17 00:00:00 2001
2 From: Anders Kaseorg <[email protected]>
3 Date: Tue, 22 Oct 2024 22:40:46 -0700
4 Subject: [PATCH] setup: Fix DeprecationWarning from ast
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 “DeprecationWarning: Attribute s is deprecated and will be removed in
10 Python 3.14; use value instead”
11
12 value was added in Python 3.8, due to ast.Str being replaced with
13 ast.Constant: https://docs.python.org/3/whatsnew/3.8.html#deprecated
14
15 Signed-off-by: Anders Kaseorg <[email protected]>
16 ---
17 setup.py | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 diff --git a/setup.py b/setup.py
21 index dd9a96e..63b3d1a 100644
22 --- a/setup.py
23 +++ b/setup.py
24 @@ -12,7 +12,7 @@ def __init__(self, path):
25 def visit_Assign(self, node):
26 if any(target.id == 'VERSION' for target in node.targets):
27 assert not hasattr(self, 'VERSION')
28 - self.VERSION = node.value.s
29 + self.VERSION = node.value.value
30
31 this_directory = os.path.abspath(os.path.dirname(__file__))
32 with open(os.path.join(this_directory, 'README.rst')) as f: