Skip to content

♻️ Add compatibility with the next version of AnyIO#1936

Merged
tiangolo merged 1 commit intoKludex:masterfrom
tiangolo:anyio-next
Nov 4, 2022
Merged

♻️ Add compatibility with the next version of AnyIO#1936
tiangolo merged 1 commit intoKludex:masterfrom
tiangolo:anyio-next

Conversation

@tiangolo
Copy link
Contributor

@tiangolo tiangolo commented Nov 4, 2022

♻️ Add compatibility with the next version of AnyIO

The next version of AnyIO (agronholm/anyio@9f97cd7), not released yet, doesn't export start_blocking_portal from the top level of the package, it has to be imported from directly where it is declared, in from_thread.

This keeps compatibility with the current version but adds compatibility with the next (current main branch in AnyIO's repo).

@tiangolo tiangolo merged commit a450272 into Kludex:master Nov 4, 2022
@tiangolo tiangolo deleted the anyio-next branch November 4, 2022 22:58
@tiangolo
Copy link
Contributor Author

tiangolo commented Nov 4, 2022

That was fast, thanks for the review @adriangb! 🚀

bfineran added a commit to neuralmagic/deepsparse that referenced this pull request Aug 31, 2023
this is for compatibility with the maximum currently allowed version of `starlette`. `anyio` just pushed a 4.0.0 that is incompatible with earlier versions of `starlette`. 

Note that this is now fixed in later versions (`deepsparse` has not yet tested against newer versions of `fastapi` and `starlette`). See: Kludex/starlette#1936


from internal bug report:
```
Our Deepsparse GHA is failing with starlette error: AttributeError: module 'anyio' has no attribute 'start_blocking_portal'
```
bfineran added a commit to neuralmagic/deepsparse that referenced this pull request Aug 31, 2023
this is for compatibility with the maximum currently allowed version of `starlette`. `anyio` just pushed a 4.0.0 that is incompatible with earlier versions of `starlette`. 

Note that this is now fixed in later versions (`deepsparse` has not yet tested against newer versions of `fastapi` and `starlette`). See: Kludex/starlette#1936


from internal bug report:
```
Our Deepsparse GHA is failing with starlette error: AttributeError: module 'anyio' has no attribute 'start_blocking_portal'
```
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