Skip to content

chore(deps): bump anyio from 4.11.0 to 4.14.2 - #1374

Merged
polmichel merged 1 commit into
stablefrom
dependabot/uv/anyio-4.14.2
Sep 20, 2026
Merged

polmichel merged 1 commit into
stablefrom
dependabot/uv/anyio-4.14.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 18, 2026

Copy link
Copy Markdown
Contributor

Bumps anyio from 4.11.0 to 4.14.2.

Release notes

Sourced from anyio's releases.

4.14.2

  • Changed ByteReceiveStream.receive() implementations to raise a ValueError when max_bytes is not a positive integer (#1191)
  • 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 (#1189; PR by @​greymoth-jp).
  • 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 (#1208)
  • Fixed anyio.open_process() (and run_process()) ignoring the extra_groups argument, as it mistakenly passed the value of the group argument instead (#1209)
  • 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 (#1218)
  • 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 (#1170; PR by @​gaoflow)
  • Fixed unnecessary CPU spin when delivering cancellation from CancelScope on asyncio under certain conditions, including improper cancel scope nesting (#1111)

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()) (#1179; PR by @​EmmanuelNiyonshuti)
  • 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 (#1183; PR by @​nyxst4ck)

4.14.0

  • Added support for Python 3.15

  • Added an asynchronous implementation of the itertools module (#998; PR by @​11kkw)

  • Added the local_port parameter to connect_tcp() to allow binding to a specific local port before connecting (#1067; PR by @​nullwiz)

  • 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) (#1098)

  • Changed TaskGroup.start_soon() to return a TaskHandle

  • Added an option for TaskGroup.start() to return a TaskHandle (which then contains the start value in the start_value property)

  • 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 (#1115; PR by @​EmmanuelNiyonshuti)

  • Improved anyio.Path to preserve subclass types by returning Self in methods that return path objects (#1130; PR by @​EmmanuelNiyonshuti)

  • 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() (#1135; PR by @​SAY-5)

  • 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. (#1153)

  • Changed anyio.run to support callables returning arbitrary awaitables at runtime on all backends. Previously, this only worked on asyncio (#1171; PR by @​gschaffner)

  • Changed several classes (and their subclasses) to have __slots__ (with __weakref__):

    • anyio.CancelScope

... (truncated)

Commits
  • c384f99 Bumped up the version
  • dbba29d Fixed 100% CPU spin on cancel scope misuse (#1217)
  • 6bbc6c3 Fix CapacityLimiter over-granting tokens on asyncio (#1172)
  • 6f82b25 Refactored TestTLSStream.test_receive_invalid_max_bytes() to be less flaky
  • be24b04 Relaxed timeouts to fix test flakiness
  • 8113506 Fix test flakiness caused by slow callback duration logging
  • 1e988b6 Fixed CapacityLimiter raising trio.WouldBlock instead of anyio.WouldBlock (#1...
  • 44713f3 Pin setup-uv to a commit sha across downstream jobs (#1213)
  • f1b7301 Fixed stderr writes in a worker subprocess causing a deadlock (#1207)
  • 212be93 Fix flaky test_tcp_listener_same_port using a hardcoded port (#1206)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Summary by cubic

Updates anyio from 4.11.0 to 4.14.2, picking up new features and bug fixes.

Written for commit 8eeb486. Summary will update on new commits.

Review in cubic

Bumps [anyio](https://github.com/agronholm/anyio) from 4.11.0 to 4.14.2.
- [Release notes](https://github.com/agronholm/anyio/releases)
- [Commits](agronholm/anyio@4.11.0...4.14.2)

---
updated-dependencies:
- dependency-name: anyio
  dependency-version: 4.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Sep 18, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner September 18, 2026 20:39
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 18, 2026

Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8eeb486
Status: ✅  Deploy successful!
Preview URL: https://1209d4eb.infrahub-sdk-python.pages.dev
Branch Preview URL: https://dependabot-uv-anyio-4-14-2.infrahub-sdk-python.pages.dev

View logs

@polmichel

Copy link
Copy Markdown
Contributor

Dependency bump analysis: safe to merge

anyio is the only version change. The other uv.lock hunks (ipython, ipython-pygments-lexers, pendulum) are marker-normalization noise from re-resolution — same versions on both sides.

Usage in this repo

Three first-party call sites, all in the async file handler, plus two in tests:

  • infrahub_sdk/file_handler.py:111anyio.to_thread.run_sync(content.open, "rb")
  • infrahub_sdk/file_handler.py:314anyio.Path(dest).open("wb")
  • infrahub_sdk/file_handler.py:322anyio.Path(dest).unlink(missing_ok=True)
  • tests/unit/sdk/test_file_object.py:256, tests/unit/sdk/test_file_handler.py:284anyio.Path(...).read_bytes()

That is the entire surface. A grep for CancelScope|create_task_group|start_soon|TaskGroup|CapacityLimiter|anyio.Event|anyio.Lock|anyio.Semaphore|anyio.Condition|ResourceGuard|anyio.run(|to_process|from_thread|BlockingPortal|move_on_after|fail_after|connect_tcp|ByteReceiveStream|open_process|run_process|TLSStream across infrahub_sdk/ and tests/ returns nothing, so most of the 4.12→4.14.2 changelog cannot apply.

Breaking changes across the full range

The PR body is truncated before 4.13.0 and 4.12.x; this covers 4.12.0 through 4.14.2.

Change Verdict
4.13.0 — dropped Python 3.9 Not applicable — requires-python = ">=3.10,<3.15"
4.12.0 — dropped sniffio dep; NoEventLoopError replaces sniffio.AsyncLibraryNotFoundError Not used — zero first-party sniffio imports. sniffio stays in the lock regardless (asgi-lifespan, prefect-client require it directly)
4.14.0 — __slots__ on CancelScope, Event, Lock, Semaphore, Condition, CapacityLimiter, ResourceGuard Not used — never instantiated or subclassed here
4.14.0 — start_soon() returns TaskHandle; start_soon/start/from_thread.run annotations narrowed Not used — no task groups; SDK concurrency is asyncio.Semaphore (infrahub_sdk/batch.py:63)
4.14.2 — ByteReceiveStream.receive() raises ValueError on non-positive max_bytes Not reachable — only path is httpx→httpcore, and chunk_size is hardcoded to 65536 (file_handler.py:317, :449)
4.14.2 — open_process() extra_groups fix; TLSStream.wrap() IDNA 2008 Not used

No deprecations in this range. No security fixes.

The 4.14.1 anyio pytest-plugin fixture-teardown fix is a role mismatch: async tests here run on pytest-asyncio (asyncio_mode = "auto"), with no @pytest.mark.anyio or anyio_backend fixture, so anyio's plugin is loaded but inert.

Fixes we do benefit from, without code changes: cancellation exception escaping a cancel scope from a worker thread (4.14.0) and CPU spin delivering CancelScope cancellation on asyncio (4.14.2) — both sit under to_thread.run_sync and httpx's transport. 4.13.0 also fixes anyio.Path on Python 3.15, which is out of scope today but unblocks a future cap bump.

Verification

Run on py3.14 via uv run --with 'anyio==4.14.2':

  • test_file_handler.py + test_file_object.py — 84 passed on both 4.11.0 and 4.14.2.
  • Full tests/unit/ — identical on both: 11 failed, 2010 passed, 2 skipped, 1 xfailed. Those 11 are pre-existing and unrelated (they come from disabling the pytest-infrahub-performance-test plugin, which crashes on macOS/py3.14 with a psutil cpu_freq SystemError before any test runs).
  • mypy and ty on file_handler.py and both test files — clean on both versions. The 4.14.0 Self-returning anyio.Path and widened IO[bytes] annotations produce no new diagnostics.

Recommendation

Merge as is. No code changes needed, and the anyio>=3.3.0 floor (pyproject.toml:27) is untouched, so dependency-lower-bounds-no-harness is unaffected.

One non-blocking note: 4.14.0 added custom capacity limiters for async path/file I/O. file_handler.py:314-318 shares anyio's global 40-thread limiter, but max_concurrent_execution defaults to 5 (infrahub_sdk/config.py:56), so there is no contention worth acting on today.

@polmichel
polmichel merged commit 81aa4ac into stable Sep 20, 2026
20 checks passed
@polmichel
polmichel deleted the dependabot/uv/anyio-4.14.2 branch September 20, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant