Skip to content

Remove pkg_resources #5007

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Remove pkg_resources #5007

wants to merge 5 commits into from

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented May 21, 2025

  • Remove pkg_resources
  • Remove assertion that 'import pkg_resources' works; it's no longer an invariant.
  • Mark pbr integration test as xfail.
  • Mark namespace tests as xfail. Support for pkg_resources-style namespaces is dropped.
  • Add news fragment.

Summary of changes

Closes #3085

Pull Request Checklist

@jaraco
Copy link
Member Author

jaraco commented May 21, 2025

To be sure, this change is a big deal. It's been decades in the making to provide replacements for this functionality. There are known open issues and efforts to remove the dependence on pkg_resources and probably other use-cases that haven't migrated. My hope is that these cases can pin to Setuptools<81.

I don't have any plans to rush this out or force it on the community, but I'd like to start thinking about what it would take to get committed.

@jaraco jaraco force-pushed the feature/remove-more-pkg_resources branch from 35e39e7 to b3f9277 Compare May 21, 2025 22:22
@jaraco jaraco requested a review from abravalheri May 22, 2025 00:01
Copy link
Contributor

@abravalheri abravalheri left a comment

Choose a reason for hiding this comment

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

Thank you very much Jason for the effort in untangling the 2 code bases.
I agree that it is time to start thinking about the removal of pkg_resources.

I propose we do it in 2 stages:

  1. Explicitly mention a "due date" to the warning message
  2. Removal once the "due date" arrives.

I have 2 doubts:

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.

Setuptools should not rely on pkg_resources
2 participants