-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: Fir 14026 frequently get attributeerror #179
fix: Fir 14026 frequently get attributeerror #179
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine as a hack, but I'm worried the functionality might break later on.
for backend in ("asyncio", "trio"): | ||
try: | ||
get_asynclib(backend) | ||
except ModuleNotFoundError: | ||
# Not all backends might be installed | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just worried since we're using a "private" API for this hack it might change without notice. As we're pinning the httpx version we're fine for now, but if we were to upgrade it might cause issues. Hopefully it will be picked up by nightly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will investigate how this could be properly fixed
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixed anyio race condition, which happened when it was lazily importing async backend modules. Now we always import all available backends on the module-level, so this issues doesn't occur anymore. Added integration test