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

Add exception for old versions of importlib_metadata #4572

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Aug 15, 2024

Summary of changes

Add exception for old versions of importlib_metadata

Closes #4570

Pull Request Checklist

@abravalheri abravalheri marked this pull request as ready for review August 15, 2024 15:19
@abravalheri abravalheri requested a review from jaraco August 15, 2024 15:19
if not hasattr(metadata, "EntryPoints"): # pragma: no cover
raise ImportError(
"`importlib-metadata` version is incompatible with `setuptools`. "
"Please install importlib-metadata>=4.6" # Equivalent to stdlib's in 3.10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The choice of importlib-metadata>=4.6 is based on the fact that the if statement above accepts stdlib's version for Python 3.10 and according to importlib_metadata's docs that is equivalent to version 4.6.

So if the codebase works with importlib.metadata in Python 3.10 it should also work with importlib_metadata 4.6. I am not sure why pyproject.toml requires importlib_metadata>=6...

Copy link
Contributor

@Avasam Avasam Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was just pinned to whatever the vendored versions were when they got added as dependencies in pyproject.toml.

Here's when you bumped importlib_metadata from 4.11.1 to 6.0.0: #3832

The bump from 4.10.1 to 4.11.1 was made here: #3109 for #3107

4.10.1 was the initial pin of this vendored dependency

@jaraco jaraco changed the title Add exception for old versions of importlib_resources Add exception for old versions of importlib_metadata Aug 16, 2024
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 this pull request may close these issues.

[BUG] Installation error importlib_metadata has no attribute 'EntryPoints
3 participants