Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-exceptiongroup for 
openSUSE:Factory checked in at 2023-07-06 18:27:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-exceptiongroup (Old)
 and      /work/SRC/openSUSE:Factory/.python-exceptiongroup.new.23466 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-exceptiongroup"

Thu Jul  6 18:27:49 2023 rev:6 rq:1096944 version:1.1.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-exceptiongroup/python-exceptiongroup.changes  
    2023-04-22 22:02:04.397795010 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-exceptiongroup.new.23466/python-exceptiongroup.changes
   2023-07-06 18:27:51.198843854 +0200
@@ -1,0 +2,10 @@
+Tue Jul  4 22:32:27 UTC 2023 - Matej Cepl <mc...@suse.com>
+
+- Update to 1.1.2:
+  - Changed handling of exceptions in exception group handler
+    callbacks to not wrap a single exception in an exception
+    group, as per CPython issue gh#python/cpython#103590.
+- Add skip-test_catch_handler_raises-for-older-311.patch 
+  (gh#agronholm/exceptiongroup#64).
+
+-------------------------------------------------------------------

Old:
----
  exceptiongroup-1.1.1-gh.tar.gz

New:
----
  exceptiongroup-1.1.2-gh.tar.gz
  skip-test_catch_handler_raises-for-older-311.patch

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

Other differences:
------------------
++++++ python-exceptiongroup.spec ++++++
--- /var/tmp/diff_new_pack.A9XmxV/_old  2023-07-06 18:27:51.898848150 +0200
+++ /var/tmp/diff_new_pack.A9XmxV/_new  2023-07-06 18:27:51.902848176 +0200
@@ -29,12 +29,15 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-exceptiongroup%{psuffix}
-Version:        1.1.1
+Version:        1.1.2
 Release:        0
 Summary:        Backport of PEP 654 (exception groups)
 License:        MIT AND Python-2.0
 URL:            https://github.com/agronholm/exceptiongroup
 Source:         
https://github.com/agronholm/exceptiongroup/archive/refs/tags/%{version}.tar.gz#/exceptiongroup-%{version}-gh.tar.gz
+# PATCH-FIX-UPSTREAM skip-test_catch_handler_raises-for-older-311.patch 
gh#agronholm/exceptiongroup#64 mc...@suse.com
+# Skip test_catch_handler_raises() on Python 3.11 if the Python version is 
less than 3.11.4
+Patch0:         skip-test_catch_handler_raises-for-older-311.patch
 BuildRequires:  %{python_module base >= 3.7}
 BuildRequires:  %{python_module flit-scm}
 BuildRequires:  %{python_module pip}
@@ -75,7 +78,7 @@
 and the exception hook won't be installed.
 
 %prep
-%setup -q -n exceptiongroup-%{version}
+%autosetup -p1 -n exceptiongroup-%{version}
 
 %if !%{with test}
 %build

++++++ exceptiongroup-1.1.1-gh.tar.gz -> exceptiongroup-1.1.2-gh.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/exceptiongroup-1.1.1/.github/workflows/test.yml 
new/exceptiongroup-1.1.2/.github/workflows/test.yml
--- old/exceptiongroup-1.1.1/.github/workflows/test.yml 2023-03-12 
22:27:24.000000000 +0100
+++ new/exceptiongroup-1.1.2/.github/workflows/test.yml 2023-07-03 
11:53:03.000000000 +0200
@@ -27,7 +27,7 @@
     strategy:
       fail-fast: false
       matrix:
-        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", pypy-3.8]
+        python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", 
pypy-3.10]
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v3
@@ -35,30 +35,24 @@
       uses: actions/setup-python@v4
       with:
         python-version: ${{ matrix.python-version }}
-    - uses: actions/cache@v3
-      with:
-        path: ~/.cache/pip
-        key: pip-test-${{ matrix.python-version }}-${{ matrix.os }}
+        allow-prereleases: true
+        cache: pip
+        cache-dependency-path: pyproject.toml
     - name: Install dependencies
-      run: pip install .[test] coveralls coverage[toml]
+      run: pip install -e .[test] coverage
     - name: Test with pytest
       run: coverage run -m pytest
     - name: Upload Coverage
-      run: coveralls --service=github
-      env:
-        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
-        COVERALLS_PARALLEL: true
+      uses: coverallsapp/github-action@v2
+      with:
+        parallel: true
 
   coveralls:
     name: Finish Coveralls
     needs: test
     runs-on: ubuntu-latest
-    container: python:3-slim
     steps:
     - name: Finished
-      run: |
-        pip install coveralls
-        coveralls --service=github --finish
-      env:
-        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      uses: coverallsapp/github-action@v2
+      with:
+        parallel-finished: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/exceptiongroup-1.1.1/.gitignore 
new/exceptiongroup-1.1.2/.gitignore
--- old/exceptiongroup-1.1.1/.gitignore 2023-03-12 22:27:24.000000000 +0100
+++ new/exceptiongroup-1.1.2/.gitignore 2023-07-03 11:53:03.000000000 +0200
@@ -7,6 +7,7 @@
 .coverage
 .pytest_cache/
 .mypy_cache/
+.ruff_cache/
 .eggs/
 .tox
 .idea
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/exceptiongroup-1.1.1/.pre-commit-config.yaml 
new/exceptiongroup-1.1.2/.pre-commit-config.yaml
--- old/exceptiongroup-1.1.1/.pre-commit-config.yaml    2023-03-12 
22:27:24.000000000 +0100
+++ new/exceptiongroup-1.1.2/.pre-commit-config.yaml    2023-07-03 
11:53:03.000000000 +0200
@@ -15,37 +15,21 @@
     args: ["--fix=lf"]
   - id: trailing-whitespace
 
-- repo: https://github.com/pycqa/isort
-  rev: 5.12.0
-  hooks:
-  - id: isort
-
 - repo: https://github.com/asottile/pyupgrade
-  rev: v3.3.1
+  rev: v3.6.0
   hooks:
   - id: pyupgrade
     args: ["--py37-plus", "--keep-runtime-typing"]
 
-- repo: https://github.com/psf/black
-  rev: 23.1.0
+- repo: https://github.com/charliermarsh/ruff-pre-commit
+  rev: v0.0.272
   hooks:
-  - id: black
-    exclude: "tests/test_catch_py311.py"
+    - id: ruff
+      args: [--fix, --show-fixes]
+      exclude: "tests/test_catch_py311.py"
 
-- repo: https://github.com/csachs/pyproject-flake8
-  rev: v6.0.0.post1
+- repo: https://github.com/psf/black
+  rev: 23.3.0
   hooks:
-  - id: pyproject-flake8
-    additional_dependencies: [flake8-bugbear]
+  - id: black
     exclude: "tests/test_catch_py311.py"
-
-- repo: https://github.com/pre-commit/pygrep-hooks
-  rev: v1.10.0
-  hooks:
-  - id: python-check-blanket-noqa
-  - id: python-check-blanket-type-ignore
-  - id: python-no-eval
-  - id: python-use-type-annotations
-  - id: rst-backticks
-  - id: rst-directive-colons
-  - id: rst-inline-touching-normal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/exceptiongroup-1.1.1/CHANGES.rst 
new/exceptiongroup-1.1.2/CHANGES.rst
--- old/exceptiongroup-1.1.1/CHANGES.rst        2023-03-12 22:27:24.000000000 
+0100
+++ new/exceptiongroup-1.1.2/CHANGES.rst        2023-07-03 11:53:03.000000000 
+0200
@@ -3,6 +3,12 @@
 
 This library adheres to `Semantic Versioning 2.0 <http://semver.org/>`_.
 
+**1.1.2**
+
+- Changed handling of exceptions in exception group handler callbacks to not 
wrap a
+  single exception in an exception group, as per
+  `CPython issue 103590 <https://github.com/python/cpython/issues/103590>`_
+
 **1.1.1**
 
 - Worked around
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/exceptiongroup-1.1.1/pyproject.toml 
new/exceptiongroup-1.1.2/pyproject.toml
--- old/exceptiongroup-1.1.1/pyproject.toml     2023-03-12 22:27:24.000000000 
+0100
+++ new/exceptiongroup-1.1.2/pyproject.toml     2023-07-03 11:53:03.000000000 
+0200
@@ -30,6 +30,9 @@
 ]
 
 [tool.flit.sdist]
+include = [
+    "tests",
+]
 exclude = [
     ".github/*",
     ".gitignore",
@@ -41,16 +44,19 @@
 local_scheme = "dirty-tag"
 write_to = "src/exceptiongroup/_version.py"
 
-[tool.black]
-target-version = ['py37']
-
-[tool.isort]
-src_paths = ["src"]
-skip_gitignore = true
-profile = "black"
+[tool.ruff]
+line-length = 88
+select = [
+    "E", "F", "W",  # default flake-8
+    "I",            # isort
+    "ISC",          # flake8-implicit-str-concat
+    "PGH",          # pygrep-hooks
+    "RUF100",       # unused noqa (yesqa)
+]
+target-version = "py37"
 
-[tool.flake8]
-max-line-length = 88
+[tool.ruff.isort]
+known-first-party = ["exceptiongroup"]
 
 [tool.pytest.ini_options]
 addopts = "-rsx --tb=short --strict-config --strict-markers"
@@ -69,13 +75,14 @@
 [tool.tox]
 legacy_tox_ini = """
 [tox]
-envlist = py37, py38, py39, py310, py311, pypy3
+envlist = py37, py38, py39, py310, py311, py312, pypy3
 skip_missing_interpreters = true
 minversion = 4.0
 
 [testenv]
 extras = test
 commands = python -m pytest {posargs}
+usedevelop = true
 
 [testenv:pyright]
 deps = pyright
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/exceptiongroup-1.1.1/src/exceptiongroup/_catch.py 
new/exceptiongroup-1.1.2/src/exceptiongroup/_catch.py
--- old/exceptiongroup-1.1.1/src/exceptiongroup/_catch.py       2023-03-12 
22:27:24.000000000 +0100
+++ new/exceptiongroup-1.1.2/src/exceptiongroup/_catch.py       2023-07-03 
11:53:03.000000000 +0200
@@ -37,7 +37,7 @@
 
         return False
 
-    def handle_exception(self, exc: BaseException) -> BaseExceptionGroup | 
None:
+    def handle_exception(self, exc: BaseException) -> BaseException | None:
         excgroup: BaseExceptionGroup | None
         if isinstance(exc, BaseExceptionGroup):
             excgroup = exc
@@ -57,6 +57,9 @@
                 break
 
         if new_exceptions:
+            if len(new_exceptions) == 1:
+                return new_exceptions[0]
+
             if excgroup:
                 new_exceptions.append(excgroup)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/exceptiongroup-1.1.1/src/exceptiongroup/_exceptions.py 
new/exceptiongroup-1.1.2/src/exceptiongroup/_exceptions.py
--- old/exceptiongroup-1.1.1/src/exceptiongroup/_exceptions.py  2023-03-12 
22:27:24.000000000 +0100
+++ new/exceptiongroup-1.1.2/src/exceptiongroup/_exceptions.py  2023-07-03 
11:53:03.000000000 +0200
@@ -60,7 +60,7 @@
         for i, exc in enumerate(__exceptions):
             if not isinstance(exc, BaseException):
                 raise ValueError(
-                    f"Item {i} of second argument (exceptions) is not an " 
f"exception"
+                    f"Item {i} of second argument (exceptions) is not an 
exception"
                 )
 
         if cls is BaseExceptionGroup:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/exceptiongroup-1.1.1/tests/test_catch.py 
new/exceptiongroup-1.1.2/tests/test_catch.py
--- old/exceptiongroup-1.1.1/tests/test_catch.py        2023-03-12 
22:27:24.000000000 +0100
+++ new/exceptiongroup-1.1.2/tests/test_catch.py        2023-07-03 
11:53:03.000000000 +0200
@@ -148,15 +148,9 @@
     def handler(exc):
         raise RuntimeError("new")
 
-    try:
+    with pytest.raises(RuntimeError, match="new"):
         with catch({(ValueError, ValueError): handler}):
             raise ExceptionGroup("booboo", [ValueError("bar")])
-    except ExceptionGroup as exc:
-        assert exc.message == ""
-        assert len(exc.exceptions) == 1
-        assert isinstance(exc.exceptions[0], RuntimeError)
-    else:
-        pytest.fail("Did not raise an ExceptionGroup")
 
 
 def test_catch_subclass():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/exceptiongroup-1.1.1/tests/test_catch_py311.py 
new/exceptiongroup-1.1.2/tests/test_catch_py311.py
--- old/exceptiongroup-1.1.1/tests/test_catch_py311.py  2023-03-12 
22:27:24.000000000 +0100
+++ new/exceptiongroup-1.1.2/tests/test_catch_py311.py  2023-07-03 
11:53:03.000000000 +0200
@@ -122,17 +122,11 @@
 
 
 def test_catch_handler_raises():
-    try:
+    with pytest.raises(RuntimeError, match="new"):
         try:
             raise ExceptionGroup("booboo", [ValueError("bar")])
         except* ValueError:
             raise RuntimeError("new")
-    except ExceptionGroup as exc:
-        assert exc.message == ""
-        assert len(exc.exceptions) == 1
-        assert isinstance(exc.exceptions[0], RuntimeError)
-    else:
-        pytest.fail("Did not raise an ExceptionGroup")
 
 
 def test_catch_subclass():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/exceptiongroup-1.1.1/tests/test_exceptions.py 
new/exceptiongroup-1.1.2/tests/test_exceptions.py
--- old/exceptiongroup-1.1.1/tests/test_exceptions.py   2023-03-12 
22:27:24.000000000 +0100
+++ new/exceptiongroup-1.1.2/tests/test_exceptions.py   2023-07-03 
11:53:03.000000000 +0200
@@ -290,7 +290,7 @@
         ]
 
         for match_type, template in testcases:
-            subeg = eg.subgroup(lambda e: isinstance(e, match_type))  # noqa: 
B023
+            subeg = eg.subgroup(lambda e: isinstance(e, match_type))
             self.assertEqual(subeg.message, eg.message)
             self.assertMatchesTemplate(subeg, ExceptionGroup, template)
 
@@ -355,7 +355,7 @@
         ]
 
         for match_type, match_template, rest_template in testcases:
-            match, rest = eg.split(lambda e: isinstance(e, match_type))  # 
noqa: B023
+            match, rest = eg.split(lambda e: isinstance(e, match_type))
             self.assertEqual(match.message, eg.message)
             self.assertMatchesTemplate(match, ExceptionGroup, match_template)
             if rest_template is not None:

++++++ skip-test_catch_handler_raises-for-older-311.patch ++++++
>From 452ba0946347b4e0df950763213f162704bc1eed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= <alex.gronh...@nextday.fi>
Date: Wed, 5 Jul 2023 12:28:15 +0300
Subject: [PATCH] Skip test_catch_handler_raises() on Python 3.11 if the Python
 version is too low

---
 tests/test_catch_py311.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/test_catch_py311.py b/tests/test_catch_py311.py
index 4351be8..5880f0a 100644
--- a/tests/test_catch_py311.py
+++ b/tests/test_catch_py311.py
@@ -1,3 +1,5 @@
+import sys
+
 import pytest
 
 from exceptiongroup import ExceptionGroup
@@ -121,6 +123,10 @@ def test_catch_full_match():
         pass
 
 
+@pytest.mark.skipif(
+    sys.version_info < (3, 11, 4),
+    reason="Behavior was changed in 3.11.4",
+)
 def test_catch_handler_raises():
     with pytest.raises(RuntimeError, match="new"):
         try:

Reply via email to