✨ Async support optionally using anyio#340
Closed
skeletorXVI wants to merge 48 commits into
Closed
Conversation
# Conflicts: # mkdocs.yml # pyproject.toml # tests/test_completion/test_completion_install.py # typer/main.py
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
4 tasks
|
@tiangolo will this reach |
# Conflicts: # pyproject.toml # tests/test_completion/test_completion.py # tests/test_completion/test_completion_install.py # tests/test_completion/test_completion_show.py # typer/main.py
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
svlandeg
reviewed
Sep 2, 2025
This comment was marked as outdated.
This comment was marked as outdated.
svlandeg
reviewed
Sep 2, 2025
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
Contributor
|
This pull request has a merge conflict that needs to be resolved. |
Member
|
Thanks for the interest here! ☕ There's a bunch of refactors we'll need to do first which will affect this, e.g. create conflicts, alter the design, etc. So it will be better to start again later at the right time. I have been avoiding closing PRs before I have an alternative to provide, but then I've left them open for too long, sorry for that. For now, I'll close this one for cleanup. But we'll continue tracking this internally to work on it again once what's needed underneath is ready. Thanks! 🍰 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I took a shot at supporting async as discussed in #88 while integrated feedback from the issue #88 and PR #332 . Unlike the existing proposal I decided to support both sync and async commands from the same decorator, as I don't see a reason to use two identical decorator functions.
anyiois listed as an extra dependency. When anyio is not installed, asyncio is used, Whenanyioandtrioare installed, the default engine becomes trio.Other async engines, or customized behavior can be used by providing a custom run function via the
async_runnerparameter to the decorator or Typer instance.