-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Correctly determine AnyIO support kwargs for run_sync #224
base: main
Are you sure you want to change the base?
Conversation
This bug affects v0.0.8 (the latest version) only. The PR also contains as prior solution to correctly detect AnyIO package version using We should avoid relying on |
@tiangolo I would recommend merging and releasing this in the next version before dropping Python 3.8 support. |
This still affects non-venv environments. This should be merged and released, as any packages using this that are installed as part of a system install (or flat package) have to explicitly block v0.0.8 from dependency mapping. |
importlib.metadata in Python 3.10 had improved handling of certain virtual environments. This change addresses the issue with some venv environments not returning a version string for AnyIO.
ffa8ec8
to
7c734f1
Compare
This should keep type checkers happy that aren't running code.
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.
can you check why the check level is failing?
#202 introduces an issue on py38 and py39 with an earlier version of
importlib.metadata
not detecting versions in certain virtual environments. It also uses string comparisons:This PR addresses the issue by using
inspect
to determine anyio's supported kwargs for therun_sync
method.