Skip to content

Commit

Permalink
setup: Fix DeprecationWarning from ast
Browse files Browse the repository at this point in the history
“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 <[email protected]>
  • Loading branch information
andersk authored and timabbott committed Oct 23, 2024
1 parent e34512b commit 70b389d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 70b389d

Please sign in to comment.