Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-astroid for openSUSE:Factory 
checked in at 2023-04-27 19:57:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-astroid (Old)
 and      /work/SRC/openSUSE:Factory/.python-astroid.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-astroid"

Thu Apr 27 19:57:09 2023 rev:44 rq:1082830 version:2.15.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-astroid/python-astroid.changes    
2023-04-22 22:03:43.626388261 +0200
+++ /work/SRC/openSUSE:Factory/.python-astroid.new.1533/python-astroid.changes  
2023-04-27 19:57:09.896595939 +0200
@@ -1,0 +2,7 @@
+Tue Apr 25 22:00:42 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 2.15.4:
+  * Add visitor function for ``TryStar`` to ``AsStringVisitor``
+    and add ``TryStar`` to ``astroid.nodes.ALL_NODE_CLASSES``.
+
+-------------------------------------------------------------------

Old:
----
  astroid-2.15.3-gh.tar.gz

New:
----
  astroid-2.15.4-gh.tar.gz

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

Other differences:
------------------
++++++ python-astroid.spec ++++++
--- /var/tmp/diff_new_pack.IFtHy1/_old  2023-04-27 19:57:10.408598949 +0200
+++ /var/tmp/diff_new_pack.IFtHy1/_new  2023-04-27 19:57:10.412598972 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-astroid
-Version:        2.15.3
+Version:        2.15.4
 Release:        0
 Summary:        Representation of Python source as an AST for pylint
 License:        LGPL-2.1-or-later

++++++ astroid-2.15.3-gh.tar.gz -> astroid-2.15.4-gh.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/ChangeLog new/astroid-2.15.4/ChangeLog
--- old/astroid-2.15.3/ChangeLog        2023-04-16 22:36:26.000000000 +0200
+++ new/astroid-2.15.4/ChangeLog        2023-04-24 10:51:12.000000000 +0200
@@ -8,12 +8,22 @@
 
 
 
-What's New in astroid 2.15.4?
+What's New in astroid 2.15.5?
 =============================
 Release date: TBA
 
 
 
+What's New in astroid 2.15.4?
+=============================
+Release date: 2023-04-24
+
+* Add visitor function for ``TryStar`` to ``AsStringVisitor`` and
+  add ``TryStar`` to ``astroid.nodes.ALL_NODE_CLASSES``.
+
+  Refs #2142
+
+
 What's New in astroid 2.15.3?
 =============================
 Release date: 2023-04-16
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/astroid/__init__.py 
new/astroid-2.15.4/astroid/__init__.py
--- old/astroid-2.15.3/astroid/__init__.py      2023-04-16 22:36:26.000000000 
+0200
+++ new/astroid-2.15.4/astroid/__init__.py      2023-04-24 10:51:12.000000000 
+0200
@@ -165,6 +165,7 @@
     Subscript,
     TryExcept,
     TryFinally,
+    TryStar,
     Tuple,
     UnaryOp,
     Unknown,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/astroid/__pkginfo__.py 
new/astroid-2.15.4/astroid/__pkginfo__.py
--- old/astroid-2.15.3/astroid/__pkginfo__.py   2023-04-16 22:36:26.000000000 
+0200
+++ new/astroid-2.15.4/astroid/__pkginfo__.py   2023-04-24 10:51:12.000000000 
+0200
@@ -2,5 +2,5 @@
 # For details: https://github.com/PyCQA/astroid/blob/main/LICENSE
 # Copyright (c) https://github.com/PyCQA/astroid/blob/main/CONTRIBUTORS.txt
 
-__version__ = "2.15.3"
+__version__ = "2.15.4"
 version = __version__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/astroid/node_classes.py 
new/astroid-2.15.4/astroid/node_classes.py
--- old/astroid-2.15.3/astroid/node_classes.py  2023-04-16 22:36:26.000000000 
+0200
+++ new/astroid-2.15.4/astroid/node_classes.py  2023-04-24 10:51:12.000000000 
+0200
@@ -76,6 +76,7 @@
     Subscript,
     TryExcept,
     TryFinally,
+    TryStar,
     Tuple,
     UnaryOp,
     Unknown,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/astroid/nodes/__init__.py 
new/astroid-2.15.4/astroid/nodes/__init__.py
--- old/astroid-2.15.3/astroid/nodes/__init__.py        2023-04-16 
22:36:26.000000000 +0200
+++ new/astroid-2.15.4/astroid/nodes/__init__.py        2023-04-24 
10:51:12.000000000 +0200
@@ -197,6 +197,7 @@
     Subscript,
     TryExcept,
     TryFinally,
+    TryStar,
     Tuple,
     UnaryOp,
     Unknown,
@@ -291,6 +292,7 @@
     "Subscript",
     "TryExcept",
     "TryFinally",
+    "TryStar",
     "Tuple",
     "UnaryOp",
     "Unknown",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/astroid/nodes/as_string.py 
new/astroid-2.15.4/astroid/nodes/as_string.py
--- old/astroid-2.15.3/astroid/nodes/as_string.py       2023-04-16 
22:36:26.000000000 +0200
+++ new/astroid-2.15.4/astroid/nodes/as_string.py       2023-04-24 
10:51:12.000000000 +0200
@@ -9,6 +9,8 @@
 from collections.abc import Iterator
 from typing import TYPE_CHECKING
 
+from astroid import nodes
+
 if TYPE_CHECKING:
     from astroid.nodes import Const
     from astroid.nodes.node_classes import (
@@ -254,13 +256,16 @@
         return ""
 
     def visit_excepthandler(self, node) -> str:
+        n = "except"
+        if isinstance(getattr(node, "parent", None), nodes.TryStar):
+            n = "except*"
         if node.type:
             if node.name:
-                excs = f"except {node.type.accept(self)} as 
{node.name.accept(self)}"
+                excs = f"{n} {node.type.accept(self)} as 
{node.name.accept(self)}"
             else:
-                excs = f"except {node.type.accept(self)}"
+                excs = f"{n} {node.type.accept(self)}"
         else:
-            excs = "except"
+            excs = f"{n}"
         return f"{excs}:\n{self._stmt_list(node.body)}"
 
     def visit_empty(self, node) -> str:
@@ -495,6 +500,17 @@
             self._stmt_list(node.body), self._stmt_list(node.finalbody)
         )
 
+    def visit_trystar(self, node) -> str:
+        """return an astroid.TryStar node as string"""
+        trys = [f"try:\n{self._stmt_list(node.body)}"]
+        for handler in node.handlers:
+            trys.append(handler.accept(self))
+        if node.orelse:
+            trys.append(f"else:\n{self._stmt_list(node.orelse)}")
+        if node.finalbody:
+            trys.append(f"finally:\n{self._stmt_list(node.finalbody)}")
+        return "\n".join(trys)
+
     def visit_tuple(self, node) -> str:
         """return an astroid.Tuple node as string"""
         if len(node.elts) == 1:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/astroid/nodes/node_ng.py 
new/astroid-2.15.4/astroid/nodes/node_ng.py
--- old/astroid-2.15.3/astroid/nodes/node_ng.py 2023-04-16 22:36:26.000000000 
+0200
+++ new/astroid-2.15.4/astroid/nodes/node_ng.py 2023-04-24 10:51:12.000000000 
+0200
@@ -590,7 +590,7 @@
         yield from ()
 
     def _infer_name(self, frame, name):
-        # overridden for ImportFrom, Import, Global, TryExcept and Arguments
+        # overridden for ImportFrom, Import, Global, TryExcept, TryStar and 
Arguments
         pass
 
     def _infer(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/astroid/rebuilder.py 
new/astroid-2.15.4/astroid/rebuilder.py
--- old/astroid-2.15.3/astroid/rebuilder.py     2023-04-16 22:36:26.000000000 
+0200
+++ new/astroid-2.15.4/astroid/rebuilder.py     2023-04-24 10:51:12.000000000 
+0200
@@ -507,6 +507,12 @@
         ) -> nodes.TryExcept | nodes.TryFinally:
             ...
 
+        if sys.version_info >= (3, 11):
+
+            @overload
+            def visit(self, node: ast.TryStar, parent: NodeNG) -> 
nodes.TryStar:
+                ...
+
         @overload
         def visit(self, node: ast.Tuple, parent: NodeNG) -> nodes.Tuple:
             ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/doc/api/astroid.nodes.rst 
new/astroid-2.15.4/doc/api/astroid.nodes.rst
--- old/astroid-2.15.3/doc/api/astroid.nodes.rst        2023-04-16 
22:36:26.000000000 +0200
+++ new/astroid-2.15.4/doc/api/astroid.nodes.rst        2023-04-24 
10:51:12.000000000 +0200
@@ -80,6 +80,7 @@
    astroid.nodes.Subscript
    astroid.nodes.TryExcept
    astroid.nodes.TryFinally
+   astroid.nodes.TryStar
    astroid.nodes.Tuple
    astroid.nodes.UnaryOp
    astroid.nodes.Unknown
@@ -230,6 +231,8 @@
 
 .. autoclass:: astroid.nodes.TryFinally
 
+.. autoclass:: astroid.nodes.TryStar
+
 .. autoclass:: astroid.nodes.Tuple
 
 .. autoclass:: astroid.nodes.UnaryOp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/tbump.toml 
new/astroid-2.15.4/tbump.toml
--- old/astroid-2.15.3/tbump.toml       2023-04-16 22:36:26.000000000 +0200
+++ new/astroid-2.15.4/tbump.toml       2023-04-24 10:51:12.000000000 +0200
@@ -1,7 +1,7 @@
 github_url = "https://github.com/PyCQA/astroid";
 
 [version]
-current = "2.15.3"
+current = "2.15.4"
 regex = '''
 ^(?P<major>0|[1-9]\d*)
 \.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/astroid-2.15.3/tests/test_group_exceptions.py 
new/astroid-2.15.4/tests/test_group_exceptions.py
--- old/astroid-2.15.3/tests/test_group_exceptions.py   2023-04-16 
22:36:26.000000000 +0200
+++ new/astroid-2.15.4/tests/test_group_exceptions.py   2023-04-24 
10:51:12.000000000 +0200
@@ -54,9 +54,8 @@
 
 @pytest.mark.skipif(not PY311_PLUS, reason="Requires Python 3.11 or higher")
 def test_star_exceptions() -> None:
-    node = extract_node(
-        textwrap.dedent(
-            """
+    code = textwrap.dedent(
+        """
     try:
         raise ExceptionGroup("group", [ValueError(654)])
     except* ValueError:
@@ -67,9 +66,10 @@
         sys.exit(127)
     finally:
         sys.exit(0)"""
-        )
     )
+    node = extract_node(code)
     assert isinstance(node, TryStar)
+    assert node.as_string() == code.replace('"', "'").strip()
     assert isinstance(node.body[0], Raise)
     assert node.block_range(1) == (1, 11)
     assert node.block_range(2) == (2, 2)

Reply via email to