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
|
From: Bernd Kuhls <bernd@kuhls.net>
Date: Mon, 8 Dec 2025 18:03:03 +0100
Subject: Fix build with python 3.14
ast.Str was deprecated in python 3.12 and removed in 3.14. It inherited
from ast.Constant, `Str.s` was equivalent to `Constant.value`, so we can
use the latter on both old and newer python versions.
Patch was inspired by
https://hg-edge.mozilla.org/mozilla-central/rev/dbf9702ed87e
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index 3c38d44..f768533 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@ class VersionFinder(ast.NodeVisitor):
def visit_Assign(self, node):
if not self.version:
if node.targets[0].id == "__version__":
- self.version = node.value.s
+ self.version = node.value.value
def read_version():
|