Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Nov 4, 2022

Conversation

tiangolo
Copy link
Sponsor Member

@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 encode:master Nov 4, 2022
@tiangolo tiangolo deleted the anyio-next branch November 4, 2022 22:58
@tiangolo
Copy link
Sponsor Member 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: encode/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: encode/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.

None yet

2 participants