guix_mirror_bot pushed a commit to branch python-team
in repository guix.

commit 00d631ba23a0fbb73f1baa6a51afbef29029aecf
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Tue Nov 3 23:28:03 2026 +0000

    gnu: python-anyio: Update to 4.16.0.
    
    * gnu/packages/python-xyz.scm (python-anyio): Update to 4.16.0.
    [arguments] <test-flags>: Skip one more test.
    [propagated-inputs]: Remove python-sniffio.
    [native-inputs]: Add python-pytest-timeout.
    
    * gnu/packages/patches/python-anyio-unuse-exceptiongroup-in-test.patch:
    Delete file.
    * gnu/local.mk (dist_patch_DATA): Deregister patch.
---
 gnu/local.mk                                       |  1 -
 ...python-anyio-unuse-exceptiongroup-in-test.patch | 48 ----------------------
 gnu/packages/python-xyz.scm                        | 28 ++++++-------
 3 files changed, 13 insertions(+), 64 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index a46fbdbb4e7..c97f043d4d8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2189,7 +2189,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/python-3.11-fix-tests.patch             \
   %D%/packages/patches/python-3.12-fix-tests.patch             \
   %D%/packages/patches/python-3.13-fix-tests.patch             \
-  %D%/packages/patches/python-anyio-unuse-exceptiongroup-in-test.patch \
   %D%/packages/patches/python-asgi-csrf-fix-formparser.patch   \
   %D%/packages/patches/python-astropy-dont-download-iers-data.patch    \
   %D%/packages/patches/python-beangulp-click-8.2-compat.patch  \
diff --git 
a/gnu/packages/patches/python-anyio-unuse-exceptiongroup-in-test.patch 
b/gnu/packages/patches/python-anyio-unuse-exceptiongroup-in-test.patch
deleted file mode 100644
index 2fc358dbbf1..00000000000
--- a/gnu/packages/patches/python-anyio-unuse-exceptiongroup-in-test.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-commit 0df0045987436d9eef2c477ecc13ebea65205e1f
-Author: Nguyễn Gia Phong <[email protected]>
-Date:   2026-01-21 13:23:43 +0900
-
-    Unuse exceptiongroup in test
-
-diff --git a/pyproject.toml b/pyproject.toml
-index dd1c0a3460a9..963da45d4ee8 100644
---- a/pyproject.toml
-+++ b/pyproject.toml
-@@ -48,7 +48,7 @@ pytest11 = {anyio = "anyio.pytest_plugin"}
- test = [
-     "blockbuster >= 1.5.23",
-     "coverage[toml] >= 7",
--    "exceptiongroup >= 1.2.0",
-+    "exceptiongroup >= 1.2.0; python_version < '3.11'",
-     "hypothesis >= 4.18.2",
-     "psutil >= 5.9",
-     "pytest >= 7.0",
-diff --git a/tests/test_taskgroups.py b/tests/test_taskgroups.py
-index b747f7291a4c..036ab9fcbeca 100644
---- a/tests/test_taskgroups.py
-+++ b/tests/test_taskgroups.py
-@@ -11,7 +11,6 @@ from typing import Any, NoReturn, cast
- from unittest import mock
- 
- import pytest
--from exceptiongroup import catch
- from pytest import FixtureRequest, MonkeyPatch
- 
- import anyio
-@@ -1550,13 +1549,12 @@ async def test_cancel_before_entering_task_group() -> 
None:
- 
- 
- async def test_reraise_cancelled_in_excgroup() -> None:
--    def handler(excgrp: BaseExceptionGroup) -> None:
--        raise
--
-     with CancelScope() as scope:
-         scope.cancel()
--        with catch({get_cancelled_exc_class(): handler}):
-+        try:
-             await anyio.sleep_forever()
-+        except* get_cancelled_exc_class():
-+            raise
- 
- 
- async def test_cancel_child_task_when_host_is_shielded() -> None:
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 31317247f5c..aff75cff666 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -30534,56 +30534,54 @@ register custom encoders and decoders.")
 (define-public python-anyio
   (package
     (name "python-anyio")
-    (version "4.12.1")
+    (version "4.16.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "anyio" version))
        (sha256
-        (base32
-         "00ypzqzllinhj2x3ai5x5bvkdb0109nw59rdjdfg1lw59hxcrks1"))
-       (patches
-        ;; Patch uses Python 3.11 except* syntax so can yet be upstreamed.
-        (search-patches "python-anyio-unuse-exceptiongroup-in-test.patch"))))
+        (base32 "1yrgn57rm29ppb6ssqr1xack5sdivn3k0z6j0cb3v60734jh7fsr"))))
     (build-system pyproject-build-system)
     (arguments
      (list
       ;; tests:
-      ;;   - x86_64-linux:   1393 passed, 70 skipped, 2 deselected, 4 xfailed
+      ;;   - x86_64-linux:   3094 passed, 118 skipped, 2 deselected, 5 xfailed
       ;;   - aarch64-linux:  1378 passed, 70 skipped, 17 deselected, 4 xfailed
       #:test-flags
       #~(list "-m" "not network"
               ;; Tests are shaky with a lot of DNS lookups.
               "--ignore=tests/test_sockets.py"
               #$@(map (lambda (ls)
-                        (string-append "--deselect=" (string-join ls "::")))
+                        (string-append "--deselect=tests/" (string-join ls 
"::")))
                       (append
                        ;; _pytest.pytester.Pytester.TimeoutExpired: 3 second
                        ;; timeout expired running: <...>
                        '(("tests/test_pytest_plugin.py"
-                          "test_keyboardinterrupt_during_test"))
+                          "test_keyboardinterrupt_during_test")
+                         ;; assert <ExitCode.OK: 0> == 2
+                         ("test_pytest_plugin.py"
+                          "test_keyboard_interrupt_does_not_resume_test"))
                        (if (target-aarch64?)
                            ;; Assertions are not equal on ARM.
-                           '(("tests/streams/test_tls.py"
-                              "TestTLSListener"
+                           '(("streams/test_tls.py" "TestTLSListener"
                               "test_handshake_fail")
-                             ("tests/test_taskgroups.py"
+                             ("test_taskgroups.py"
                               "test_shielded_cancel_sleep_time")
-                             ("tests/test_to_thread.py"
+                             ("test_to_thread.py"
                               "test_run_in_custom_limiter")
-                             ("tests/test_to_thread.py"
+                             ("test_to_thread.py"
                               "TestBlockingPortalProvider"
                               "test_single_thread"))
                            '()))))))
     (propagated-inputs
      (list python-idna
-           python-sniffio
            python-typing-extensions))
     (native-inputs
      (list python-blockbuster
            python-psutil
            python-pytest
            python-pytest-mock
+           python-pytest-timeout
            python-setuptools
            python-setuptools-scm
            python-trio

Reply via email to