-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: main
Are you sure you want to change the base?
Remove pkg_resources #5007
Conversation
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. |
35e39e7
to
b3f9277
Compare
There was a problem hiding this 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:
- Explicitly mention a "due date" to the warning message
- Removal once the "due date" arrives.
I have 2 doubts:
-
Does the
namespace_packages
(deprecated) keyword forsetup.py
works withoutpkg_resources.declare_namespace
?If I understood correctly previously these worked in tandem, but I don't know what is the situation now after the latest changes in https://github.com/pypa/setuptools/blob/v80.8.0/setuptools/namespaces.py#L47-L63.
-
Is the idea of https://github.com/pypa/pkg_resources to also publish something to PyPI? Even if the package is born deprecated it may be a "last-resort" alternative for users that rely on packages that have not received updates for a long time, or that are still working on the migration...
I know at least that folks from
zope
/plone
have been slowly trying to replacepkg_resources.declare_namespace
for a while, but are not there quite yet (refs: Should we add aDeprecationWarning
topkg_resources.declare_namespace
? #3434 (comment), Switch to PEP 420 (Implicit namespace packages) zopefoundation/meta#194), so maybe that would be useful if they take can install a package to extend the time they can work on the migration. We could also consider addingpkg_resources
insetuptools.build_meta:__legacy__.get_requires_for_build_sdist
if we want to be very conservative about the transition.Update: I can see in Setuptools should not rely on pkg_resources #3085 (comment) that this is not straight forward.
Summary of changes
Closes #3085
Pull Request Checklist
newsfragments/
.(See documentation for details)