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

Metadata returned even for superseded packages #280

Closed
jaraco opened this issue Jan 26, 2021 · 2 comments · Fixed by #281
Closed

Metadata returned even for superseded packages #280

jaraco opened this issue Jan 26, 2021 · 2 comments · Fixed by #281

Comments

@jaraco
Copy link
Member

jaraco commented Jan 26, 2021

In jaraco/keyring#486, the reporter encountered an issue when keyring 22 changed the name of an entry point. After the change, with the latest version installed with --user and an older version installed in system site-packages, there are two copies of keyring installed, the latest version taking precedence. importlib_metadata, however, loads metadata for both packages, including references to the unreachable and no longer valid entry points from the older package.

Probably the entry_points loading mechanism should only return entry points for the first package by any given name.

@gothicVI
Copy link

I'm the original reporter. Let me know if there's any information I can provide or debug I could do.
I'll happily help.

jaraco added a commit that referenced this issue Jan 26, 2021
@jaraco
Copy link
Member Author

jaraco commented Jan 26, 2021

In the aforementioned commit, I've started work on an implementation that appears to work. It still needs tests. However, I'm reluctant to simply roll it out because it has the potential to substantially degrade performance of loading entry points, as it requires loading and parsing the metadata for each package in order to resolve the name. I'm not sure there's a better alternative, though.

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 a pull request may close this issue.

2 participants