-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
importing importlib_metadata
monkeypatches stdlib importlib breaking apis
#300
Comments
importlib-metadata
monkeypatches stdlib importlib breaking apisimportlib_metadata
monkeypatches stdlib importlib breaking apis
Looking at the only code that's run implicitly on import, it acknowledges that the monkeypatching is sketchy and references #91 as the motivation. There's quite a bit of detail there, but it explains the challenge that this library faces in attempting to provide backward and forward compatibility for multiple versions of Python. In that issue, we settled on any import of importlib_metadata as giving it primacy for PathDistributions over the stdlib version. More importantly, however, is that what you're encountering is an API incompatibility introduced in importlib_metadata 3.6. You can recreate the error in any version of
Basically what it boils down to is that access by index of a So in one sense, the behavior you encountered is working as intended. The question is, what are you trying to accomplish? Can I help you accomplish that in a way that's compatible with both? For example, the following works in all versions:
|
In bpo-44246, several users have indicated that maintaining compatibility for this interface would be important to them even if there are no users affected by it. |
See miurahr/aqtinstall#221 for an affected user. Although that use-case is no longer affected. |
…Distribution.entry_points. Fixes #300.
In the downstream report, @asottile also reports:
|
The text was updated successfully, but these errors were encountered: