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