Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-asttokens for 
openSUSE:Factory checked in at 2023-10-29 19:39:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-asttokens (Old)
 and      /work/SRC/openSUSE:Factory/.python-asttokens.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-asttokens"

Sun Oct 29 19:39:34 2023 rev:10 rq:1120751 version:2.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-asttokens/python-asttokens.changes        
2023-09-28 00:44:01.528960550 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-asttokens.new.17445/python-asttokens.changes 
    2023-10-29 19:39:38.862677684 +0100
@@ -1,0 +2,6 @@
+Fri Oct 27 08:14:19 UTC 2023 - ecsos <[email protected]>
+
+- Update to version 2.4.1
+  * Support Astroid v3
+
+-------------------------------------------------------------------

Old:
----
  asttokens-2.4.0.tar.gz

New:
----
  asttokens-2.4.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-asttokens.spec ++++++
--- /var/tmp/diff_new_pack.1t8G7r/_old  2023-10-29 19:39:40.466736040 +0100
+++ /var/tmp/diff_new_pack.1t8G7r/_new  2023-10-29 19:39:40.470736185 +0100
@@ -22,7 +22,7 @@
 %define skip_python36 1
 %{?sle15_python_module_pythons}
 Name:           python-asttokens
-Version:        2.4.0
+Version:        2.4.1
 Release:        0
 Summary:        Annotate AST trees with source code positions
 License:        Apache-2.0

++++++ asttokens-2.4.0.tar.gz -> asttokens-2.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/.editorconfig 
new/asttokens-2.4.1/.editorconfig
--- old/asttokens-2.4.0/.editorconfig   1970-01-01 01:00:00.000000000 +0100
+++ new/asttokens-2.4.1/.editorconfig   2023-10-26 11:36:46.000000000 +0200
@@ -0,0 +1,6 @@
+[*]
+indent_size = 2
+indent_style = space
+
+insert_final_newline = true
+trim_trailing_whitespace = true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/.github/workflows/build-and-test.yml 
new/asttokens-2.4.1/.github/workflows/build-and-test.yml
--- old/asttokens-2.4.0/.github/workflows/build-and-test.yml    2023-09-02 
13:49:39.000000000 +0200
+++ new/asttokens-2.4.1/.github/workflows/build-and-test.yml    2023-10-26 
11:36:46.000000000 +0200
@@ -20,12 +20,28 @@
           - 3.9
           - '3.10'
           - 3.11
-          - 3.12.0-rc.1
+          - 3.12
           # As per 
https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#pypy
 list of versions
           - pypy-2.7
           - pypy-3.6
           - pypy-3.7
           - pypy-3.8
+        astroid-version:
+          - ''
+        include:
+          # Test recent Python on Astroid v2 too (the above natural tests will
+          # pick up Astroid v3 for these Python versions)
+          - python-version: '3.8'
+            astroid-version: '<3'
+          - python-version: '3.9'
+            astroid-version: '<3'
+          - python-version: '3.10'
+            astroid-version: '<3'
+          - python-version: '3.11'
+            astroid-version: '<3'
+          - python-version: '3.12'
+            astroid-version: '<3'
+
     env:
       ASTTOKENS_SLOW_TESTS: 1
       COVERALLS_PARALLEL: true
@@ -53,7 +69,7 @@
       - name: Install dependencies
         run: |
           pip install --upgrade coveralls pytest setuptools setuptools_scm 
pep517
-          pip install .[test]
+          pip install .[test] 'astroid${{ matrix.astroid-version }}'
 
       - name: Mypy testing
         run: |
@@ -96,7 +112,7 @@
 
       - name: Mypy testing for Python 2
         run: |
-          python -m mypy --py2 asttokens  
+          python -m mypy --py2 asttokens
 
   finish:
     needs: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/PKG-INFO new/asttokens-2.4.1/PKG-INFO
--- old/asttokens-2.4.0/PKG-INFO        2023-09-04 18:54:45.001366600 +0200
+++ new/asttokens-2.4.1/PKG-INFO        2023-10-26 12:02:41.002259700 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: asttokens
-Version: 2.4.0
+Version: 2.4.1
 Summary: Annotate AST trees with source code positions
 Home-page: https://github.com/gristlabs/asttokens
 Author: Dmitry Sagalovskiy, Grist Labs
@@ -29,8 +29,16 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
-Provides-Extra: test
 License-File: LICENSE
+Requires-Dist: six>=1.12.0
+Requires-Dist: typing; python_version < "3.5"
+Provides-Extra: astroid
+Requires-Dist: astroid<2,>=1; python_version < "3" and extra == "astroid"
+Requires-Dist: astroid<4,>=2; python_version >= "3" and extra == "astroid"
+Provides-Extra: test
+Requires-Dist: astroid<2,>=1; python_version < "3" and extra == "test"
+Requires-Dist: astroid<4,>=2; python_version >= "3" and extra == "test"
+Requires-Dist: pytest; extra == "test"
 
 ASTTokens
 =========
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/asttokens/astroid_compat.py 
new/asttokens-2.4.1/asttokens/astroid_compat.py
--- old/asttokens-2.4.0/asttokens/astroid_compat.py     2022-11-29 
12:31:12.000000000 +0100
+++ new/asttokens-2.4.1/asttokens/astroid_compat.py     2023-10-26 
11:36:46.000000000 +0200
@@ -3,12 +3,16 @@
 
   # astroid_node_classes should be whichever module has the NodeNG class
   from astroid.nodes import NodeNG
+  from astroid.nodes import BaseContainer
 except Exception:
   try:
     from astroid import node_classes as astroid_node_classes
     from astroid.node_classes import NodeNG
+    from astroid.node_classes import _BaseContainer as BaseContainer
   except Exception:  # pragma: no cover
     astroid_node_classes = None
     NodeNG = None
+    BaseContainer = None
 
-__all__ = ["astroid_node_classes", "NodeNG"]
+
+__all__ = ["astroid_node_classes", "NodeNG", "BaseContainer"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/asttokens/mark_tokens.py 
new/asttokens-2.4.1/asttokens/mark_tokens.py
--- old/asttokens-2.4.0/asttokens/mark_tokens.py        2023-09-02 
13:49:39.000000000 +0200
+++ new/asttokens-2.4.1/asttokens/mark_tokens.py        2023-10-26 
11:36:46.000000000 +0200
@@ -24,7 +24,7 @@
 from . import util
 from .asttokens import ASTTokens
 from .util import AstConstant
-from .astroid_compat import astroid_node_classes as nc
+from .astroid_compat import astroid_node_classes as nc, BaseContainer as 
AstroidBaseContainer
 
 if TYPE_CHECKING:
   from .util import AstNode
@@ -229,7 +229,7 @@
     # type: (AstNode, util.Token, util.Token) -> Tuple[util.Token, util.Token]
     # With astroid, nodes that start with a doc-string can have an empty body, 
in which case we
     # need to adjust the last token to include the doc string.
-    if not node.body and getattr(node, 'doc', None): # type: ignore[union-attr]
+    if not node.body and (getattr(node, 'doc_node', None) or getattr(node, 
'doc', None)): # type: ignore[union-attr]
       last_token = self._code.find_token(last_token, token.STRING)
 
     # Include @ from decorator
@@ -312,7 +312,7 @@
     # In Python3.8 parsed tuples include parentheses when present.
     def handle_tuple_nonempty(self, node, first_token, last_token):
       # type: (AstNode, util.Token, util.Token) -> Tuple[util.Token, 
util.Token]
-      assert isinstance(node, ast.Tuple) or isinstance(node, nc._BaseContainer)
+      assert isinstance(node, ast.Tuple) or isinstance(node, 
AstroidBaseContainer)
       # It's a bare tuple if the first token belongs to the first child. The 
first child may
       # include extraneous parentheses (which don't create new nodes), so 
account for those too.
       child = node.elts[0]
@@ -331,7 +331,7 @@
 
   def visit_tuple(self, node, first_token, last_token):
     # type: (AstNode, util.Token, util.Token) -> Tuple[util.Token, util.Token]
-    assert isinstance(node, ast.Tuple) or isinstance(node, nc._BaseContainer)
+    assert isinstance(node, ast.Tuple) or isinstance(node, 
AstroidBaseContainer)
     if not node.elts:
       # An empty tuple is just "()", and we need no further info.
       return (first_token, last_token)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/asttokens/version.py 
new/asttokens-2.4.1/asttokens/version.py
--- old/asttokens-2.4.0/asttokens/version.py    2023-09-04 18:54:44.000000000 
+0200
+++ new/asttokens-2.4.1/asttokens/version.py    2023-10-26 12:02:40.000000000 
+0200
@@ -1 +1 @@
-__version__ = "2.4.0"
+__version__ = "2.4.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/asttokens.egg-info/PKG-INFO 
new/asttokens-2.4.1/asttokens.egg-info/PKG-INFO
--- old/asttokens-2.4.0/asttokens.egg-info/PKG-INFO     2023-09-04 
18:54:44.000000000 +0200
+++ new/asttokens-2.4.1/asttokens.egg-info/PKG-INFO     2023-10-26 
12:02:40.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: asttokens
-Version: 2.4.0
+Version: 2.4.1
 Summary: Annotate AST trees with source code positions
 Home-page: https://github.com/gristlabs/asttokens
 Author: Dmitry Sagalovskiy, Grist Labs
@@ -29,8 +29,16 @@
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
-Provides-Extra: test
 License-File: LICENSE
+Requires-Dist: six>=1.12.0
+Requires-Dist: typing; python_version < "3.5"
+Provides-Extra: astroid
+Requires-Dist: astroid<2,>=1; python_version < "3" and extra == "astroid"
+Requires-Dist: astroid<4,>=2; python_version >= "3" and extra == "astroid"
+Provides-Extra: test
+Requires-Dist: astroid<2,>=1; python_version < "3" and extra == "test"
+Requires-Dist: astroid<4,>=2; python_version >= "3" and extra == "test"
+Requires-Dist: pytest; extra == "test"
 
 ASTTokens
 =========
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/asttokens.egg-info/SOURCES.txt 
new/asttokens-2.4.1/asttokens.egg-info/SOURCES.txt
--- old/asttokens-2.4.0/asttokens.egg-info/SOURCES.txt  2023-09-04 
18:54:44.000000000 +0200
+++ new/asttokens-2.4.1/asttokens.egg-info/SOURCES.txt  2023-10-26 
12:02:40.000000000 +0200
@@ -1,3 +1,4 @@
+.editorconfig
 .gitignore
 .pylintrc
 .readthedocs.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/asttokens.egg-info/requires.txt 
new/asttokens-2.4.1/asttokens.egg-info/requires.txt
--- old/asttokens-2.4.0/asttokens.egg-info/requires.txt 2023-09-04 
18:54:44.000000000 +0200
+++ new/asttokens-2.4.1/asttokens.egg-info/requires.txt 2023-10-26 
12:02:40.000000000 +0200
@@ -3,6 +3,19 @@
 [:python_version < "3.5"]
 typing
 
+[astroid]
+
+[astroid:python_version < "3"]
+astroid<2,>=1
+
+[astroid:python_version >= "3"]
+astroid<4,>=2
+
 [test]
-astroid
 pytest
+
+[test:python_version < "3"]
+astroid<2,>=1
+
+[test:python_version >= "3"]
+astroid<4,>=2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/docs/requirements.txt 
new/asttokens-2.4.1/docs/requirements.txt
--- old/asttokens-2.4.0/docs/requirements.txt   2023-09-02 13:49:39.000000000 
+0200
+++ new/asttokens-2.4.1/docs/requirements.txt   2023-10-26 11:36:46.000000000 
+0200
@@ -29,20 +29,20 @@
 pygments==2.16.1
     # via sphinx
 readthedocs-sphinx-search==0.3.1
-    # via -r docs/requirements.in
+    # via -r requirements.in
 requests==2.31.0
     # via sphinx
 six==1.16.0
-    # via -r docs/requirements.in
+    # via -r requirements.in
 snowballstemmer==2.2.0
     # via sphinx
 sphinx==6.2.1
     # via
-    #   -r docs/requirements.in
+    #   -r requirements.in
     #   sphinx-rtd-theme
     #   sphinxcontrib-jquery
 sphinx-rtd-theme==1.2.2
-    # via -r docs/requirements.in
+    # via -r requirements.in
 sphinxcontrib-applehelp==1.0.4
     # via sphinx
 sphinxcontrib-devhelp==1.0.2
@@ -57,5 +57,5 @@
     # via sphinx
 sphinxcontrib-serializinghtml==1.1.5
     # via sphinx
-urllib3==2.0.4
+urllib3==2.0.7
     # via requests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/setup.cfg 
new/asttokens-2.4.1/setup.cfg
--- old/asttokens-2.4.0/setup.cfg       2023-09-04 18:54:45.001366600 +0200
+++ new/asttokens-2.4.1/setup.cfg       2023-10-26 12:02:41.006259700 +0200
@@ -40,7 +40,13 @@
 setup_requires = setuptools>=44; setuptools_scm[toml]>=3.4.3
 
 [options.extras_require]
-test = astroid; pytest
+astroid = 
+       astroid >=1, <2; python_version < "3"
+       astroid >=2, <4; python_version >= "3"
+test = 
+       astroid >=1, <2; python_version < "3"
+       astroid >=2, <4; python_version >= "3"
+       pytest
 
 [options.package_data]
 asttokens = py.typed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/tests/test_astroid.py 
new/asttokens-2.4.1/tests/test_astroid.py
--- old/asttokens-2.4.0/tests/test_astroid.py   2023-09-02 13:49:39.000000000 
+0200
+++ new/asttokens-2.4.1/tests/test_astroid.py   2023-10-26 11:36:46.000000000 
+0200
@@ -11,6 +11,7 @@
 class TestAstroid(test_mark_tokens.TestMarkTokens):
 
   is_astroid_test = True
+  astroid_version = int(astroid.__version__.split('.')[0])
   module = astroid
 
   nodes_classes = astroid_node_classes.NodeNG
@@ -27,9 +28,12 @@
 
     Similar to ast.iter_fields, but for astroid and ignores context
     """
-    for field in node._astroid_fields + node._other_fields:
+    fields = node._astroid_fields + node._other_fields
+    for field in fields:
       if field == 'ctx':
         continue
+      if field == 'doc' and 'doc_node' in fields:
+        continue
       yield field, getattr(node, field)
 
   @staticmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/asttokens-2.4.0/tests/test_mark_tokens.py 
new/asttokens-2.4.1/tests/test_mark_tokens.py
--- old/asttokens-2.4.0/tests/test_mark_tokens.py       2023-09-02 
13:49:39.000000000 +0200
+++ new/asttokens-2.4.1/tests/test_mark_tokens.py       2023-10-26 
11:36:46.000000000 +0200
@@ -32,6 +32,7 @@
   # the `astroid` library. The latter derives TestAstroid class from 
TestMarkTokens. For checks
   # that differ between them, .is_astroid_test allows to distinguish.
   is_astroid_test = False
+  astroid_version = None  # type: int | None
   module = ast
 
   def create_mark_checker(self, source, verify=True):
@@ -140,9 +141,14 @@
     tested_nodes = m.verify_all_nodes(self)
 
     exp_index = (0 if six.PY2 else 1) + (3 if self.is_astroid_test else 0)
-    # For ast on Python 3.9, slices are expressions, we handle them and test 
them.
-    if not self.is_astroid_test and issubclass(ast.Slice, ast.expr):
-      exp_index += 1
+    if not self.is_astroid_test:
+      # For ast on Python 3.9, slices are expressions, we handle them and test 
them.
+      if issubclass(ast.Slice, ast.expr):
+        exp_index += 1
+    else:
+      # Astroid v3 has some changes from v2
+      if self.astroid_version == 3:
+        exp_index += 1
     exp_tested_nodes = self.expect_tested_nodes[path][exp_index]
     self.assertEqual(tested_nodes, exp_tested_nodes)
 
@@ -151,20 +157,20 @@
   # change reduces the count by a lot, it's a red flag that the test is now 
covering fewer nodes.
   expect_tested_nodes = {
     #                                   AST                  | Astroid
-    #                                   Py2   Py3  Py3+slice | Py2   Py3
-    'astroid/__init__.py':            ( 4,    4,   4,          4,    4,   ),
-    'astroid/absimport.py':           ( 4,    3,   3,          4,    3,   ),
-    'astroid/all.py':                 ( 21,   23,  23,         21,   23,  ),
-    'astroid/clientmodule_test.py':   ( 75,   67,  67,         69,   69,  ),
-    'astroid/descriptor_crash.py':    ( 30,   28,  28,         30,   30,  ),
-    'astroid/email.py':               ( 3,    3,   3,          1,    1,   ),
-    'astroid/format.py':              ( 64,   61,  61,         62,   62,  ),
-    'astroid/module.py':              ( 185,  174, 174,        171,  171, ),
-    'astroid/module2.py':             ( 248,  253, 255,        240,  253, ),
-    'astroid/noendingnewline.py':     ( 57,   59,  59,         57,   63,  ),
-    'astroid/notall.py':              ( 15,   17,  17,         15,   17,  ),
-    'astroid/recursion.py':           ( 6,    6,   6,          4,    4,   ),
-    'astroid/suppliermodule_test.py': ( 20,   17,  17,         18,   18,  ),
+    #                                   Py2   Py3  Py3+slice | Py2   Py3+v2 
Py3+v3
+    'astroid/__init__.py':            ( 4,    4,   4,          4,    4,     4, 
  ),
+    'astroid/absimport.py':           ( 4,    3,   3,          4,    3,     3, 
  ),
+    'astroid/all.py':                 ( 21,   23,  23,         21,   23,    
23,  ),
+    'astroid/clientmodule_test.py':   ( 75,   67,  67,         69,   69,    
69,  ),
+    'astroid/descriptor_crash.py':    ( 30,   28,  28,         30,   30,    
30,  ),
+    'astroid/email.py':               ( 3,    3,   3,          1,    1,     1, 
  ),
+    'astroid/format.py':              ( 64,   61,  61,         62,   62,    
62,  ),
+    'astroid/module.py':              ( 185,  174, 174,        171,  171,   
173, ),
+    'astroid/module2.py':             ( 248,  253, 255,        240,  253,   
253, ),
+    'astroid/noendingnewline.py':     ( 57,   59,  59,         57,   63,    
63,  ),
+    'astroid/notall.py':              ( 15,   17,  17,         15,   17,    
17,  ),
+    'astroid/recursion.py':           ( 6,    6,   6,          4,    4,     4, 
  ),
+    'astroid/suppliermodule_test.py': ( 20,   17,  17,         18,   18,    
18,  ),
   }
 
   # This set of methods runs verifications for the variety of syntax 
constructs used in the
@@ -507,7 +513,7 @@
       @deco3()
       def g(x):
         pass
-      
+
       @deco4
       class C:
         pass

Reply via email to