diff options
| author | Nguyễn Gia Phong <cnx@loang.net> | 2026-01-20 22:07:03 +0900 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-02-07 12:28:32 +0100 |
| commit | 48fa7f2122f968fcf6011cb149af955d8fe5310e (patch) | |
| tree | 2951d207913949b6ee76175ccf35f79c2c648024 | |
| parent | 81df280103e692725a3983689f1a7a622d31dfc2 (diff) | |
gnu: python-anyio: Update to 4.12.1.
* gnu/packages/patches/python-anyio-unuse-exceptiongroup-in-test.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/python-xyz.scm (python-anyio): Update to 4.12.1.
[source] <patches>: Add patch.
[arguments] <#:test-flags>: Unskip a test removed upstream.
[native-inputs]: Add python-blockbuster.
[home-page]: Change to the documentation website.
Change-Id: I3b73ec261817186b2b6a153eb844ff86dfdd28af
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/patches/python-anyio-unuse-exceptiongroup-in-test.patch | 48 | ||||
| -rw-r--r-- | gnu/packages/python-xyz.scm | 16 |
3 files changed, 58 insertions, 7 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 3488ba3caeb..ccd6955a772 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -2066,6 +2066,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3.12-fix-tests.patch \ %D%/packages/patches/python-accupy-use-matplotx.patch \ %D%/packages/patches/python-accupy-fix-use-of-perfplot.patch \ + %D%/packages/patches/python-anyio-unuse-exceptiongroup-in-test.patch \ %D%/packages/patches/python-bed-reader-use-store-samples.patch \ %D%/packages/patches/python-chai-drop-python2.patch \ %D%/packages/patches/python-clarabel-blas.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 new file mode 100644 index 00000000000..2fc358dbbf1 --- /dev/null +++ b/gnu/packages/patches/python-anyio-unuse-exceptiongroup-in-test.patch @@ -0,0 +1,48 @@ +commit 0df0045987436d9eef2c477ecc13ebea65205e1f +Author: Nguyễn Gia Phong <cnx@loang.net> +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 d93c7fce32f..65e1a37fea4 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -28991,18 +28991,21 @@ register custom encoders and decoders.") (define-public python-anyio (package (name "python-anyio") - (version "4.10.0") + (version "4.12.1") (source (origin (method url-fetch) (uri (pypi-uri "anyio" version)) (sha256 (base32 - "19ivjwk60cyxc5cm7699f3007rp8wxqq6nxahx2p8fb0r4sswgrz")))) + "00ypzqzllinhj2x3ai5x5bvkdb0109nw59rdjdfg1lw59hxcrks1")) + (patches + ;; Patch uses Python 3.11 except* syntax so can yet be upstreamed. + (search-patches "python-anyio-unuse-exceptiongroup-in-test.patch")))) (build-system pyproject-build-system) (arguments (list - ;; tests: 1462 passed, 47 skipped, 665 deselected, 6 xfailed + ;; tests: 1580 passed, 67 skipped, 700 deselected, 4 xfailed #:test-flags #~(list "-p" "no:asyncio" "-m" "not network" @@ -29010,8 +29013,6 @@ register custom encoders and decoders.") (string-join (list "not test_is_block_device" - ;; AssertionError - "test_anyio_fixture_adoption_does_not_persist" #$@(cond ((or (target-aarch64?) (target-riscv64?)) @@ -29053,7 +29054,8 @@ register custom encoders and decoders.") python-sniffio python-typing-extensions)) (native-inputs - (list python-psutil + (list python-blockbuster + python-psutil python-pytest python-pytest-mock python-setuptools @@ -29062,7 +29064,7 @@ register custom encoders and decoders.") python-trustme python-truststore python-uvloop)) - (home-page "https://github.com/agronholm/anyio") + (home-page "https://anyio.readthedocs.io") (synopsis "Compatibility layer for multiple asynchronous event loops") (description "AnyIO is an asynchronous networking and concurrency library that works |
