diff --git a/asttokens-3.0.0.tar.gz b/asttokens-3.0.0.tar.gz deleted file mode 100644 index 27387b7..0000000 --- a/asttokens-3.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0dcd8baa8d62b0c1d118b399b2ddba3c4aff271d0d7a9e0d4c1681c79035bbc7 -size 61978 diff --git a/asttokens-3.0.1.tar.gz b/asttokens-3.0.1.tar.gz new file mode 100644 index 0000000..0e7c236 --- /dev/null +++ b/asttokens-3.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71a4ee5de0bde6a31d64f6b13f2293ac190344478f081c3d1bccfcf5eacb0cb7 +size 62308 diff --git a/py314-deprecations.patch b/py314-deprecations.patch deleted file mode 100644 index 0c15969..0000000 --- a/py314-deprecations.patch +++ /dev/null @@ -1,59 +0,0 @@ -From bb1df1417159f6ad0ec5c6c8b27118d50b35f70a Mon Sep 17 00:00:00 2001 -From: Karolina Surma <33810531+befeleme@users.noreply.github.com> -Date: Tue, 7 Jan 2025 13:58:06 +0100 -Subject: [PATCH] Replace ast.Str usages with ast.Constant (#157) - ---- - tests/test_asttokens.py | 2 +- - tests/test_tokenless.py | 4 ++-- - tests/test_util.py | 2 +- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tests/test_asttokens.py b/tests/test_asttokens.py -index b9489cb..c654af3 100644 ---- a/tests/test_asttokens.py -+++ b/tests/test_asttokens.py -@@ -125,7 +125,7 @@ def test_unicode_offsets(self): - - # Verify that ast parser produces offsets as we expect. This is just to inform the - # implementation. -- string_node = next(n for n in ast.walk(root) if isinstance(n, ast.Str)) -+ string_node = next(n for n in ast.walk(root) if isinstance(n, ast.Constant)) - self.assertEqual(string_node.lineno, 1) - self.assertEqual(string_node.col_offset, 4) - -diff --git a/tests/test_tokenless.py b/tests/test_tokenless.py -index ab2f3d6..881c69a 100644 ---- a/tests/test_tokenless.py -+++ b/tests/test_tokenless.py -@@ -47,7 +47,7 @@ def is_fstring_format_spec(node): - and len(node.values) == 1 - and ( - ( -- isinstance(node.values[0], ast.Str) -+ isinstance(node.values[0], ast.Constant) - and node.values[0].value in ['.2f'] - ) or ( - isinstance(node.values[0], ast.FormattedValue) -@@ -97,7 +97,7 @@ def check_node(self, atok, node): - atok_text = atok.get_text(node, padded=padded) - if ast_text: - if sys.version_info < (3, 12) and ( -- ast_text.startswith("f") and isinstance(node, (ast.Str, ast.FormattedValue)) -+ ast_text.startswith("f") and isinstance(node, (ast.Constant, ast.FormattedValue)) - or is_fstring_format_spec(node) - or (not fstring_positions_work() and is_fstring_internal_node(node)) - ): -diff --git a/tests/test_util.py b/tests/test_util.py -index a38fef2..0c7f94d 100644 ---- a/tests/test_util.py -+++ b/tests/test_util.py -@@ -98,7 +98,7 @@ def test_replace(self): - source = "foo(bar(1 + 2), 'hello' + ', ' + 'world')" - atok = asttokens.ASTTokens(source, parse=True) - names = [n for n in asttokens.util.walk(atok.tree) if isinstance(n, ast.Name)] -- strings = [n for n in asttokens.util.walk(atok.tree) if isinstance(n, ast.Str)] -+ strings = [n for n in asttokens.util.walk(atok.tree) if isinstance(n, ast.Constant) and isinstance(n.value, str)] - repl1 = [atok.get_text_range(n) + ('TEST',) for n in names] - repl2 = [atok.get_text_range(n) + ('val',) for n in strings] - self.assertEqual(asttokens.util.replace(source, repl1 + repl2), diff --git a/python-asttokens.changes b/python-asttokens.changes index 0fbef07..b5cc056 100644 --- a/python-asttokens.changes +++ b/python-asttokens.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Mon Nov 17 08:44:09 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 3.0.1 + * Replace ast.Str usages with ast.Constant (#157) + * Bump jinja2 from 3.1.4 to 3.1.6 in /docs + * Bump urllib3 from 2.2.2 to 2.5.0 in /docs + * Bump requests from 2.32.2 to 2.32.4 in /docs + * Various links improvements (#163) + * Adapt asttokens for astroid 4.x (#165) + * Add tests for astroid v2, v3, and v4 to the CI (#166) + * Update mypy; add 3.14 to the CI; drop python 3.8 support (#167) +- Drop py314-deprecations.patch, merged upstream + ------------------------------------------------------------------- Sun Sep 21 20:18:07 UTC 2025 - Dirk Müller diff --git a/python-asttokens.spec b/python-asttokens.spec index c4957d2..6320a29 100644 --- a/python-asttokens.spec +++ b/python-asttokens.spec @@ -19,14 +19,13 @@ %{?sle15_python_module_pythons} Name: python-asttokens -Version: 3.0.0 +Version: 3.0.1 Release: 0 Summary: Annotate AST trees with source code positions License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/gristlabs/asttokens Source: https://files.pythonhosted.org/packages/source/a/asttokens/asttokens-%{version}.tar.gz -Patch1: https://github.com/gristlabs/asttokens/commit/bb1df1417159f6ad0ec5c6c8b27118d50b35f70a.patch#/py314-deprecations.patch BuildRequires: %{python_module astroid} BuildRequires: %{python_module devel} BuildRequires: %{python_module pip}