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 2025-09-23 16:05:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-astroid (Old)
 and      /work/SRC/openSUSE:Factory/.python-astroid.new.27445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-astroid"

Tue Sep 23 16:05:40 2025 rev:61 rq:1306358 version:3.3.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-astroid/python-astroid.changes    
2025-07-24 18:46:08.223169156 +0200
+++ /work/SRC/openSUSE:Factory/.python-astroid.new.27445/python-astroid.changes 
2025-09-23 16:05:49.267939433 +0200
@@ -1,0 +2,5 @@
+Sun Sep 21 19:34:11 UTC 2025 - Dirk Müller <[email protected]>
+
+- add py314-failing-tests.patch
+
+-------------------------------------------------------------------

New:
----
  py314-failing-tests.patch

----------(New B)----------
  New:
- add py314-failing-tests.patch
----------(New E)----------

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

Other differences:
------------------
++++++ python-astroid.spec ++++++
--- /var/tmp/diff_new_pack.v3JgjB/_old  2025-09-23 16:05:51.108016668 +0200
+++ /var/tmp/diff_new_pack.v3JgjB/_new  2025-09-23 16:05:51.120017172 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-astroid
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,6 +24,8 @@
 License:        LGPL-2.1-or-later
 URL:            https://github.com/pycqa/astroid
 Source:         
https://github.com/PyCQA/astroid/archive/refs/tags/v%{version}.tar.gz#/astroid-%{version}-gh.tar.gz
+# PATCH-FIX-UPSTREAM: https://github.com/pylint-dev/astroid/pull/2731.patch
+Patch1:         py314-failing-tests.patch
 BuildRequires:  %{python_module base >= 3.8}
 BuildRequires:  %{python_module mypy}
 BuildRequires:  %{python_module pip}
@@ -35,9 +37,6 @@
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildArch:      noarch
-%if 0%{?python_version_nodots} < 311
-Requires:       python-typing-extensions >= 3.10
-%endif
 %python_subpackages
 
 %description
@@ -54,8 +53,7 @@
 objects.
 
 %prep
-%setup -q -n astroid-%{version}
-%autopatch -p1
+%autosetup -p1 -n astroid-%{version}
 
 %build
 %pyproject_wheel

++++++ py314-failing-tests.patch ++++++
>From 6849c59d70aac995c6122374bbe3d59ed41d37aa Mon Sep 17 00:00:00 2001
From: Pierre Sassoulas <[email protected]>
Date: Thu, 8 May 2025 20:45:30 +0200
Subject: [PATCH 1/3] [ci] Start testing on python 3.14-beta

---
 .github/workflows/ci.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: astroid-3.3.11/.github/workflows/ci.yaml
===================================================================
--- astroid-3.3.11.orig/.github/workflows/ci.yaml
+++ astroid-3.3.11/.github/workflows/ci.yaml
@@ -81,7 +81,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
+        python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
     outputs:
       python-key: ${{ steps.generate-python-key.outputs.key }}
     steps:
@@ -139,7 +139,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
+        python-version: [3.9, "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
     steps:
       - name: Set temp directory
         run: echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
Index: astroid-3.3.11/tests/test_nodes.py
===================================================================
--- astroid-3.3.11.orig/tests/test_nodes.py
+++ astroid-3.3.11/tests/test_nodes.py
@@ -28,7 +28,14 @@ from astroid import (
     transforms,
     util,
 )
-from astroid.const import IS_PYPY, PY310_PLUS, PY311_PLUS, PY312_PLUS, Context
+from astroid.const import (
+    IS_PYPY,
+    PY310_PLUS,
+    PY311_PLUS,
+    PY312_PLUS,
+    PY314_PLUS,
+    Context,
+)
 from astroid.context import InferenceContext
 from astroid.exceptions import (
     AstroidBuildingError,
@@ -109,11 +116,31 @@ class AsStringTest(resources.SysPathSetu
         ast = abuilder.string_build("raise_string(*args, **kwargs)").body[0]
         self.assertEqual(ast.as_string(), "raise_string(*args, **kwargs)")
 
-    def test_module_as_string(self) -> None:
-        """Check as_string on a whole module prepared to be returned 
identically."""
+    @pytest.mark.skipif(PY314_PLUS, reason="return in finally is now a syntax 
error")
+    def test_module_as_string_pre_3_14(self) -> None:
+        """Check as_string on a whole module prepared to be returned 
identically for py < 3.14."""
+        self.maxDiff = None
         module = resources.build_file("data/module.py", "data.module")
         with open(resources.find("data/module.py"), encoding="utf-8") as fobj:
-            self.assertMultiLineEqual(module.as_string(), fobj.read())
+            # Ignore comments in python file
+            data_str = "\n".join(
+                [s for s in fobj.read().split("\n") if not 
s.lstrip().startswith("# ")]
+            )
+            self.assertMultiLineEqual(module.as_string(), data_str)
+
+    @pytest.mark.skipif(
+        not PY314_PLUS, reason="return in finally is now a syntax error"
+    )
+    def test_module_as_string(self) -> None:
+        """Check as_string on a whole module prepared to be returned 
identically for py > 3.14."""
+        self.maxDiff = None
+        module = resources.build_file("data/module3.14.py", "data.module3.14")
+        with open(resources.find("data/module3.14.py"), encoding="utf-8") as 
fobj:
+            # Ignore comments in python file
+            data_str = "\n".join(
+                [s for s in fobj.read().split("\n") if not 
s.lstrip().startswith("# ")]
+            )
+            self.assertMultiLineEqual(module.as_string(), data_str)
 
     def test_module2_as_string(self) -> None:
         """Check as_string on a whole module prepared to be returned 
identically."""
Index: astroid-3.3.11/tests/testdata/python3/data/module.py
===================================================================
--- astroid-3.3.11.orig/tests/testdata/python3/data/module.py
+++ astroid-3.3.11/tests/testdata/python3/data/module.py
@@ -59,7 +59,9 @@ class YOUPI(YO):
                 return 'hehe'
             global_access(local, val=autre)
         finally:
-            return local
+            # return in finally was previously tested here but became a syntax 
error
+            # in 3.14 and this file is used in 188/1464 tests
+            a = local
     
     def static_method():
         """static method test"""
Index: astroid-3.3.11/tests/testdata/python3/data/module3.14.py
===================================================================
--- /dev/null
+++ astroid-3.3.11/tests/testdata/python3/data/module3.14.py
@@ -0,0 +1,91 @@
+"""test module for astroid
+"""
+
+__revision__ = '$Id: module.py,v 1.2 2005-11-02 11:56:54 syt Exp $'
+from astroid.nodes.node_classes import Name as NameNode
+from astroid import modutils
+from astroid.utils import *
+import os.path
+MY_DICT = {}
+
+def global_access(key, val):
+    """function test"""
+    local = 1
+    MY_DICT[key] = val
+    for i in val:
+        if i:
+            del MY_DICT[i]
+            continue
+        else:
+            break
+    else:
+        return
+
+
+class YO:
+    """hehe
+    haha"""
+    a = 1
+    
+    def __init__(self):
+        try:
+            self.yo = 1
+        except ValueError as ex:
+            pass
+        except (NameError, TypeError):
+            raise XXXError()
+        except:
+            raise
+
+
+
+class YOUPI(YO):
+    class_attr = None
+    
+    def __init__(self):
+        self.member = None
+    
+    def method(self):
+        """method
+        test"""
+        global MY_DICT
+        try:
+            MY_DICT = {}
+            local = None
+            autre = [a for (a, b) in MY_DICT if b]
+            if b in autre:
+                return
+            elif a in autre:
+                return 'hehe'
+            global_access(local, val=autre)
+        finally:
+            # return in finally was previously tested here but became a syntax 
error
+            # in 3.14 and is used in 188/1464 tests
+            print(local)
+    
+    def static_method():
+        """static method test"""
+        assert MY_DICT, '???'
+    static_method = staticmethod(static_method)
+    
+    def class_method(cls):
+        """class method test"""
+        exec(a, b)
+    class_method = classmethod(class_method)
+
+
+def four_args(a, b, c, d):
+    """four arguments (was nested_args)"""
+    while 1:
+        if a:
+            break
+        a += +1
+    else:
+        b += -2
+    if c:
+        d = a and (b or c)
+    else:
+        c = a and b or d
+    list(map(lambda x, y: (y, x), a))
+redirect = four_args
+
Index: astroid-3.3.11/tests/test_builder.py
===================================================================
--- astroid-3.3.11.orig/tests/test_builder.py
+++ astroid-3.3.11/tests/test_builder.py
@@ -898,8 +898,7 @@ class FileBuildTest(unittest.TestCase):
         _locals = method.locals
         keys = sorted(_locals)
         # ListComp variables are not accessible outside
-        self.assertEqual(len(_locals), 3)
-        self.assertEqual(keys, ["autre", "local", "self"])
+        self.assertEqual(keys, ["a", "autre", "local", "self"])
 
     def test_unknown_encoding(self) -> None:
         with self.assertRaises(AstroidSyntaxError):

Reply via email to