Open Stealthii opened 2 days ago
This bug affects v0.0.8 (the latest version) only.
The PR also contains as prior solution to correctly detect AnyIO package version using importlib-metadata
and numeric comparison for Python < 3.10, however this was ultimately replaced with the kwargs check.
We should avoid relying on importlib.metadata
outside of build environments as it relies heavily on discoverable dist-info
or egg-info
metadata, which may not be available in non-virtualenv setups (such as system-level packages).
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.