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
|
Description: Fix setup.py for py3.14 ast.Constant change
Python 3.8+ replaced ast.Str with ast.Constant. Accessing `.s` breaks
under Python 3.14. Update version parsing to handle ast.Constant.
Author: Emmanuel Arias <eamanu@debian.org>
Bug-Debian: https://bugs.debian.org/1122468
Forwarded: yes
Last-Update: 2025-12-19
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 206c57e..b925e7a 100755
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ def version():
with open('untokenize.py') as input_file:
for line in input_file:
if line.startswith('__version__'):
- return ast.parse(line).body[0].value.s
+ return ast.parse(line).body[0].value.value
with open('README.rst') as readme:
|