8000 ✨ Add support for Trio via AnyIO by graingert · Pull Request #3372 · fastapi/fastapi · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6cc34f1
configure strict pytest options
graingert Feb 10, 2021
9f50ab2
open/close files with with
graingert Feb 10, 2021
388b5c9
support trio via anyio with starlette 0.15.0
graingert Jun 14, 2021
33ffaa7
WebSocketDisconnect only happens in websocket_connect context manager
graingert Jun 23, 2021
15b9f76
drop pytest-asyncio dep
graingert Jun 23, 2021
0349712
Merge branch 'configure-strict-pytest' of github.com:graingert/fastap…
graingert Jun 23, 2021
06f543d
Merge branch 'master' into anyio
graingert Jun 29, 2021
3b689b7
Update pyproject.toml
graingert Jul 19, 2021
0622860
bump anyio[trio]
graingert Jul 19, 2021
327cfd0
Merge branch 'master' into anyio
graingert Jul 19, 2021
17ed7ea
increase coverage with pytest.fail() # pragma: no cover
graingert Jul 19, 2021
9b14e4a
drop async_generator and async_exit_stack deps
graingert Jul 20, 2021
7af1e84
drop aiofiles
graingert Jul 20, 2021
0c7195f
Merge branch 'master' into anyio
graingert Jul 24, 2021
ada7c74
Merge branch 'master' of git://github.com/tiangolo/fastapi into anyio
graingert Aug 3, 2021
a539aa6
Merge branch 'master' of git://github.com/tiangolo/fastapi into anyio
graingert Sep 24, 2021
bcfddbe
✏️ Fix typo
tiangolo Oct 6, 2021
702aca3
⏪ Revert import/reexport style in concurrency to simplify maintainabi…
tiangolo Oct 6, 2021
580c65b
♻️ Simplify and inline re-implementation of asyncio.gather()
tiangolo Oct 6, 2021
861f71d
📌 Pin Starlette to the gradual next version, minimum that supports AnyIO
tiangolo Oct 6, 2021
51c5edd
🔀 Merge master
tiangolo Oct 6, 2021
9b52693
🔇 Add pytest filterwarning needed by AnyIO in Python 3.9
tiangolo Oct 6, 2021
96cb5b2
🔀 Merge master
tiangolo Oct 6, 2021
7c19efb
➕ Add contextlib2 as a direct dependency during the migration
tiangolo Oct 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
⏪ Revert import/reexport style in concurrency to simplify maintainabi…
…lity
  • Loading branch information
tiangolo committed Oct 6, 2021
commit 702aca3f36777cf37940de298a612295827fb8d6
23 changes: 8 additions & 15 deletions fastapi/concurrency.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
import sys
from typing import AsyncGenerator, ContextManager, TypeVar

__all__ = [
"iterate_in_threadpool",
"run_in_threadpool",
"run_until_first_complete",
"contextmanager_in_threadpool",
"asynccontextmanager",
"AsyncExitStack",
]

from starlette.concurrency import (
iterate_in_threadpool,
run_in_threadpool,
run_until_first_complete,
from starlette.concurrency import iterate_in_threadpool as iterate_in_threadpool # noqa
from starlette.concurrency import run_in_threadpool as run_in_threadpool # noqa
from starlette.concurrency import ( # noqa
run_until_first_complete as run_until_first_complete,
)

if sys.version_info >= (3, 7):
from contextlib import AsyncExitStack, asynccontextmanager
from contextlib import AsyncExitStack as AsyncExitStack
from contextlib import asynccontextmanager as asynccontextmanager
else:
from contextlib2 import AsyncExitStack, asynccontextmanager
from contextlib2 import AsyncExitStack as AsyncExitStack # noqa
from contextlib2 import asynccontextmanager as asynccontextmanager # noqa


_T = TypeVar("_T")
Expand Down
0