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

Bump importlib metadata dependency #631

Merged
merged 6 commits into from
Jul 7, 2023

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Jun 27, 2023

@jaraco jaraco force-pushed the bugfix/630-importlib-metadata branch from fa21abb to db02304 Compare June 27, 2023 08:33
@layday
Copy link
Member

layday commented Jun 27, 2023

You'll also need to update the min version in https://github.com/pypa/build/blob/main/tests/constraints.txt. Technically, the PR looks solid - we should've consolidated the metadata import in a separate module long ago :) I don't know if we wanna add a fallback for packagers however.

@henryiii
Copy link
Contributor

FYI, personally, I have started putting all backports into _compat, with the same folder structure as the stdlib. So this would be _compat/importlib.py or _compat/importlib/metadata.py. Don't have to follow that here, I just find it works well, scales to multiple backports, and is easy to remove when the backport period is over.

I don't know if we wanna add a fallback for packagers however.

Guessing you mean to make bootstrapping, etc easier? So we'd have a try/except around the <3.10 branch?

@jaraco
Copy link
Member Author

jaraco commented Jun 27, 2023

FYI, personally, I have started putting all backports into _compat, with the same folder structure as the stdlib. So this would be _compat/importlib.py or _compat/importlib/metadata.py. Don't have to follow that here, I just find it works well, scales to multiple backports, and is easy to remove when the backport period is over.

I often do something similar, and I go a step further and group the compat modules by Python version, so py38compat supplies compatibility interfaces until Python 3.8 support is dropped (example). That makes it really easy to locate and remove the relevant pieces when they're no longer needed.

@jaraco
Copy link
Member Author

jaraco commented Jun 27, 2023

You'll also need to update the min version in https://github.com/pypa/build/blob/main/tests/constraints.txt.

Done in 72537a7.

pyproject.toml Outdated Show resolved Hide resolved
@henryiii henryiii merged commit 870a9ff into pypa:main Jul 7, 2023
@jaraco jaraco deleted the bugfix/630-importlib-metadata branch August 26, 2023 15:33
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.

InvalidRequirement on Python 3.8
3 participants