Debian Codegraph @

debian/patches/0002-Fix-deprecated-ast.Str-usage.patch

raw
1 From: =?utf-8?q?Timo_R=C3=B6hling?= <[email protected]>
2 Date: Mon, 22 Dec 2025 10:35:01 +0100
3 Subject: Fix deprecated ast.Str usage
4
5 ---
6 setup.py | 4 ++--
7 1 file changed, 2 insertions(+), 2 deletions(-)
8
9 diff --git a/setup.py b/setup.py
10 index f3d9f75..aba6f66 100644
11 --- a/setup.py
12 +++ b/setup.py
13 @@ -87,8 +87,8 @@ with open(join(here, "html5lib", "__init__.py"), "rb") as init_file:
14 if (len(a.targets) == 1 and
15 isinstance(a.targets[0], ast.Name) and
16 a.targets[0].id == "__version__" and
17 - isinstance(a.value, ast.Str)):
18 - version = a.value.s
19 + isinstance(a.value, ast.Constant)):
20 + version = str(a.value.value)
21
22 setup(name='html5lib',
23 version=version,