Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-anyio for openSUSE:Factory checked in at 2026-08-06 16:19:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-anyio (Old) and /work/SRC/openSUSE:Factory/.python-anyio.new.16738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-anyio" Thu Aug 6 16:19:00 2026 rev:33 rq:1369748 version:4.14.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-anyio/python-anyio.changes 2026-04-28 11:54:09.952008650 +0200 +++ /work/SRC/openSUSE:Factory/.python-anyio.new.16738/python-anyio.changes 2026-08-06 16:19:10.230099661 +0200 @@ -1,0 +2,132 @@ +Tue Aug 4 15:57:57 UTC 2026 - Matej Cepl <[email protected]> + +- Instead of using sed make a proper patch extend_timeouts.patch + to increase timeout in test_pytest_plugin module +- Add robust_test_shielded_cancel_sleep_time.patch making that + test more robust (gh#agronholm/anyio!1264). +- Add fix-uvloop-closed-loop-race.patch to protect against a race + condition in the test_cancel_worker_thread test + (gh#agronholm/anyio!1266). + +------------------------------------------------------------------- +Sat Jul 25 20:15:56 UTC 2026 - Matej Cepl <[email protected]> + +- Update to 4.14.2: + - Changed ByteReceiveStream.receive() implementations to + raise a ValueError when max_bytes is not a positive integer + - Fixed CapacityLimiter.total_tokens rejecting float("inf") + when the limiter was instantiated outside of an event loop. + The adapter setter checked for infinity by identity (value + is math.inf), so only the exact math.inf singleton was + accepted, while every backend setter (using math.isinf()) + accepts any positive infinity + - Fixed to_process.run_sync() deadlocking when the worker + function writes enough data to sys.stderr to fill the + (undrained) pipe buffer. The worker process now redirects + sys.stderr to os.devnull as well, matching the documented + behavior + - Fixed TLSStream.wrap() matching an internationalized + (unicode) host name against the peer certificate using IDNA + 2003 (via the standard library) instead of IDNA 2008, which + could cause the host name to be matched against the wrong + certificate + - Fixed anyio.open_process() (and run_process()) ignoring the + extra_groups argument, as it mistakenly passed the value of + the group argument instead + - Fixed CapacityLimiter.acquire_nowait() and + CapacityLimiter.acquire_nowait_on_behalf_of() raising + trio.WouldBlock instead of anyio.WouldBlock on the trio + backend when there are no tokens available + - Fixed CapacityLimiter on the asyncio backend over-granting + tokens (borrowed_tokens exceeding total_tokens and + available_tokens going negative) when a non-blocking + acquire was made in the window between a token being + released and the notified waiter resuming. The freed token + is now reserved for the woken waiter right away, so the + non-blocking acquire correctly raises WouldBlock + - Fixed unnecessary CPU spin when delivering cancellation + from CancelScope on asyncio under certain conditions, + including improper cancel scope nesting +- Update to 4.14.1: + - Fixed teardown of higher-scoped async fixtures failing on + asyncio with RuntimeError: Attempted to exit cancel scope + in a different task than it was entered in when an async + test raise an outcome exception (e.g., pytest.skip(), + pytest.xfail(), or pytest.fail()) + - Fixed CapacityLimiter.total_tokens rejecting a value of + 0 when the limiter was instantiated outside of an event + loop, contradicting the documented behavior of allowing + 0 total tokens +- Update to 4.14.0: + - Added support for Python 3.15 + - Added an asynchronous implementation of the itertools + module + - Added the local_port parameter to connect_tcp() to allow + binding to a specific local port before connecting + - Added support for custom capacity limiters in async path + and file I/O functions and classes + - Added the create_task() task group method for easier + asyncio migration (returns a TaskHandle) + - Changed TaskGroup.start_soon() to return a TaskHandle + - Added an option for TaskGroup.start() to return + a TaskHandle + - Added the cancel() convenience method to TaskGroup as + a shortcut for cancelling the task group's cancel scope + - Improved the error message when a known backend is not + installed to suggest the install command + - Improved anyio.Path to preserve subclass types by returning + Self in methods that return path objects + - Changed the parameter type annotation in + anyio.Path.write_bytes() to accept any ReadableBuffer, thus + allowing it to accept bytearray and memoryview to match + pathlib.Path.write_bytes() + - Changed several type annotations to only accept callables + returning coroutine-like objects instead of arbitrary + awaitables: + TaskGroup.start_soon() + TaskGroup.start() + anyio.from_thread.run() + - This reverts an earlier change from v3.7.0 which was made + in error. + - Changed anyio.run to support callables returning arbitrary + awaitables at runtime on all backends. Previously, this + only worked on asyncio + - Changed several classes (and their subclasses) to have + __slots__ (with __weakref__): + anyio.CancelScope + anyio.CapacityLimiter + anyio.Condition + anyio.Event + anyio.Lock + anyio.ResourceGuard + anyio.Semaphore + - Fixed cancellation exception escaping a cancel scope when + triggered via check_cancelled() in a worker thread + - Fixed TaskGroup raising AttributeError instead of a clear + error when entered more than once + - Fixed lost type information when passing arguments to + lru_cache + - Fixed test resumption after KeyboardInterrupt in async + generator fixtures on the asyncio backend + - Fixed import of __main__ in to_process workers when + entrypoint script doesn't end in .py, such as when using + console_script entrypoints. + - Fixed SocketListener.from_socket() returning a TCP listener + for AF_UNIX listening sockets, causing accept() to fail + with ENOTSUP + - Fixed UDPSocket.aclose() and ConnectedUDPSocket.aclose() on + asyncio returning before the underlying socket FD was + actually released + - Fixed trio backend test runner hanging indefinitely instead + of raising an error when dynamically accessing an async + fixture via request.getfixturevalue + - Fixed cancelling tasks started through a BlockingPortal + after the portal has been stopped + - Fixed backend_options being ignored when running the Trio + backend via anyio.run(); the options are now passed as + keyword arguments to trio.run() again, as documented (a + regression from AnyIO 3) + - Fixed asyncio Lock and Semaphore deadlocks caused by + cancelled waiters left queued during release + +------------------------------------------------------------------- Old: ---- anyio-4.13.0.tar.gz New: ---- anyio-4.14.2.tar.gz extend_timeouts.patch fix-uvloop-closed-loop-race.patch robust_test_shielded_cancel_sleep_time.patch ----------(New B)---------- New: - Instead of using sed make a proper patch extend_timeouts.patch to increase timeout in test_pytest_plugin module New: test more robust (gh#agronholm/anyio!1264). - Add fix-uvloop-closed-loop-race.patch to protect against a race condition in the test_cancel_worker_thread test New: to increase timeout in test_pytest_plugin module - Add robust_test_shielded_cancel_sleep_time.patch making that test more robust (gh#agronholm/anyio!1264). ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-anyio.spec ++++++ --- /var/tmp/diff_new_pack.W5CQd2/_old 2026-08-06 16:19:12.438176696 +0200 +++ /var/tmp/diff_new_pack.W5CQd2/_new 2026-08-06 16:19:12.454177254 +0200 @@ -26,12 +26,21 @@ %endif %{?sle15_python_module_pythons} Name: python-anyio%{psuffix} -Version: 4.13.0 +Version: 4.14.2 Release: 0 Summary: High level compatibility layer for asynchronous event loop implementations License: MIT URL: https://github.com/agronholm/anyio Source: https://files.pythonhosted.org/packages/source/a/anyio/anyio-%{version}.tar.gz +# PATCH-FIX-UPSTREAM robust_test_shielded_cancel_sleep_time.patch gh#agronholm/anyio!1264 [email protected] +# improve robustness of test_shielded_cancel_sleep_time +Patch0: robust_test_shielded_cancel_sleep_time.patch +# PATCH-FIX-UPSTREAM fix-uvloop-closed-loop-race.patch gh#agronholm/anyio!1266 [email protected] +# protect against a race condition in the test_cancel_worker_thread test +Patch1: fix-uvloop-closed-loop-race.patch +# PATCH-FIX-OPENSUSE extend_timeouts.patch [email protected] +# increase timeout in test_pytest_plugin module +Patch2: extend_timeouts.patch BuildRequires: %{python_module base >= 3.10} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 77} @@ -47,6 +56,7 @@ BuildRequires: %{python_module psutil >= 5.9} BuildRequires: %{python_module pytest >= 8.4} BuildRequires: %{python_module pytest-mock >= 3.14} +BuildRequires: %{python_module pytest-timeout} BuildRequires: %{python_module trio >= 0.32.0} BuildRequires: %{python_module trustme >= 1.0.0} BuildRequires: %{python_module truststore >= 0.9.1} @@ -55,12 +65,8 @@ # /SECTION BuildRequires: fdupes Requires: python-idna >= 2.8 -%if 0%{?python_version_nodots} < 313 -Requires: python-typing_extensions >= 4.5 -%endif -%if 0%{?python_version_nodots} < 311 -Requires: python-exceptiongroup >= 1.0.2 -%endif +Requires: (python-exceptiongroup >= 1.0.2 if python-base < 3.11) +Requires: (python-typing_extensions >= 4.5 if python-base < 3.13) Suggests: python-trio >= 0.32.0 BuildArch: noarch %python_subpackages @@ -87,10 +93,6 @@ %if %{with test} %check -# increase timeout in test_keyboardinterrupt_during_test -sed -i 's/timeout=3/timeout=8/' tests/test_pytest_plugin.py - -sed -i '/filterwarnings/,/^]/ { /"error"/ d}' pyproject.toml # bind and resolution failures inside OBS donttest+=" or (TestTCPStream and (ipv4 or ipv6))" donttest+=" or (TestTCPListener and (ipv4 or ipv6))" ++++++ anyio-4.13.0.tar.gz -> anyio-4.14.2.tar.gz ++++++ ++++ 8592 lines of diff (skipped) ++++++ extend_timeouts.patch ++++++ --- tests/test_pytest_plugin.py | 6 +++--- tests/test_taskgroups.py | 4 ++-- tests/test_to_thread.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) Index: anyio-4.14.2/tests/test_pytest_plugin.py =================================================================== --- anyio-4.14.2.orig/tests/test_pytest_plugin.py 2026-07-12 22:28:36.000000000 +0200 +++ anyio-4.14.2/tests/test_pytest_plugin.py 2026-08-05 10:37:35.996003636 +0200 @@ -474,7 +474,7 @@ """ ) - testdir.runpytest_subprocess(*pytest_args, timeout=3) + testdir.runpytest_subprocess(*pytest_args, timeout=20) def test_keyboard_interrupt_does_not_resume_test(testdir: Pytester) -> None: @@ -504,7 +504,7 @@ """ ) - result = testdir.runpytest_subprocess(*pytest_args, timeout=5) + result = testdir.runpytest_subprocess(*pytest_args, timeout=20) assert result.ret == 2 result.stdout.no_fnmatch_line("*RESUMED_AFTER_INTERRUPT*") result.stdout.fnmatch_lines(["*KeyboardInterrupt*"]) @@ -635,7 +635,7 @@ """ ) - result = testdir.runpytest_subprocess(*pytest_args, timeout=3) + result = testdir.runpytest_subprocess(*pytest_args, timeout=15) result.stdout.fnmatch_lines( [ "*RuntimeError: Cannot schedule a coroutine in the test runner while another is already running;*" Index: anyio-4.14.2/tests/test_taskgroups.py =================================================================== --- anyio-4.14.2.orig/tests/test_taskgroups.py 2026-08-05 10:37:25.510309863 +0200 +++ anyio-4.14.2/tests/test_taskgroups.py 2026-08-05 10:37:35.996663971 +0200 @@ -1085,8 +1085,8 @@ async def test_deadline_moved() -> None: - with fail_after(0.1) as scope: - scope.deadline += 0.3 + with fail_after(0.2) as scope: + scope.deadline += 0.6 await sleep(0.2) Index: anyio-4.14.2/tests/test_to_thread.py =================================================================== --- anyio-4.14.2.orig/tests/test_to_thread.py 2026-07-12 22:28:36.000000000 +0200 +++ anyio-4.14.2/tests/test_to_thread.py 2026-08-05 10:37:35.996357343 +0200 @@ -78,7 +78,7 @@ for _ in range(4): tg.start_soon(task_worker) - await sleep(0.1) + await sleep(0.5) assert len(active_threads) == 3 assert limiter.borrowed_tokens == 3 event.set() @@ -167,7 +167,7 @@ async def run_in_thread() -> None: nonlocal task task = asyncio.current_task() - await to_thread.run_sync(time.sleep, 0.2, abandon_on_cancel=True) + await to_thread.run_sync(time.sleep, 0.05, abandon_on_cancel=True) async with create_task_group() as tg: tg.start_soon(run_in_thread) ++++++ fix-uvloop-closed-loop-race.patch ++++++ --- src/anyio/_backends/_asyncio.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Index: anyio-4.14.2/src/anyio/_backends/_asyncio.py =================================================================== --- anyio-4.14.2.orig/src/anyio/_backends/_asyncio.py 2026-07-12 22:28:36.000000000 +0200 +++ anyio-4.14.2/src/anyio/_backends/_asyncio.py 2026-08-05 10:37:29.592800077 +0200 @@ -1037,9 +1037,13 @@ del threadlocals.current_cancel_scope if not self.loop.is_closed(): - self.loop.call_soon_threadsafe( - self._report_result, future, result, exception - ) + try: + self.loop.call_soon_threadsafe( + self._report_result, future, result, exception + ) + except RuntimeError: + # Event loop was closed just after the is_closed() check + pass del result, exception ++++++ robust_test_shielded_cancel_sleep_time.patch ++++++ --- tests/test_taskgroups.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) Index: anyio-4.14.2/tests/test_taskgroups.py =================================================================== --- anyio-4.14.2.orig/tests/test_taskgroups.py 2026-07-12 22:28:36.000000000 +0200 +++ anyio-4.14.2/tests/test_taskgroups.py 2026-08-05 10:37:25.510309863 +0200 @@ -1436,7 +1436,8 @@ """ event = anyio.Event() - hang_time = 0.2 + sleep_time = 0.5 + hang_time = 0.6 async def set_event() -> None: await sleep(hang_time) @@ -1444,7 +1445,7 @@ async def never_cancel_task() -> None: with CancelScope(shield=True): - await sleep(0.2) + await sleep(sleep_time) await event.wait() async with create_task_group() as tg: @@ -1455,7 +1456,9 @@ tg.cancel_scope.cancel() process_time = time.process_time() - assert (time.process_time() - process_time) < hang_time + # We allow a buffer for architectural overhead. + # A spinning loop would consume ~hang_time CPU time. + assert (time.process_time() - process_time) < hang_time * 1.5 async def test_cancelscope_wrong_exit_order() -> None:
