Skip to content

Make anyio.run support Awaitable at runtime on all backends - #1171

Merged
agronholm merged 4 commits into
agronholm:masterfrom
gschaffner:fix-run-awaitable-trio
Jun 15, 2026
Merged

agronholm merged 4 commits into
agronholm:masterfrom
gschaffner:fix-run-awaitable-trio

Conversation

@gschaffner

Copy link
Copy Markdown
Collaborator

Changes

Adds anyio.run runtime support for callables returning arbitrary, non-Coroutine Awaitables. Follow-up for #1153 (review).

Also adds tests for BlockingPortal's runtime Awaitable support.

Checklist

If this is a user-facing code change, like a bugfix or a new feature, please ensure that
you've fulfilled the following conditions (where applicable):

  • You've added tests (in tests/) which would fail without your patch
  • You've updated the documentation (in docs/), in case of behavior changes or new
    features
  • You've added a new changelog entry (in docs/versionhistory.rst).

If this is a trivial change, like a typo fix or a code reformatting, then you can ignore
these instructions.

Comment thread tests/misc.py Outdated

@agronholm agronholm left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple comments, and when those have been addressed, I'm good for merging.

Comment thread tests/misc.py Outdated
Comment thread docs/versionhistory.rst Outdated
@agronholm
agronholm merged commit 550b68e into agronholm:master Jun 15, 2026
34 of 35 checks passed
@gschaffner
gschaffner deleted the fix-run-awaitable-trio branch June 15, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants