-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Upgrade to setuptools 67.6.1 causes DeprecationWarning
about pkg_resources
#11975
Comments
Maybe we should just stop supporting eggs? IMO, it's about time. In the meantime, I don't know what the best course of action is - we could patch out the warning from our vendored copy of setuptools, or disable the warning using the warnings machinery. Or we could just revert the setuptools upgrade, as being more trouble than it's worth... @pypa/pip-committers any thoughts? I should point out, this might block the backport of 23.1 to ensurepip in CPython 3.10 and earlier1, as I believe the CPython test suite runs with warnings as errors. Footnotes
|
Let's do that, for now. |
I won't merge just yet, I'll wait in case any other committers have different views. I don't think this means that we should remove the setuptools upgrade from the ensurepip PR for CPython, as it's only used to pre-install in |
Should we enable the egg deprecation at the same time? pip/src/pip/_internal/metadata/importlib/_envs.py Lines 176 to 178 in 3b8791f
|
I'm -1 on doing that in a bugfix release. Maybe we should have done it in 23.1, but we didn't... |
DeprecationWarning
about pkg_resources
Oh, I think we should -- python/cpython#101039 ;) |
If that goes in, then yes I'll drop setuptools from the upgrade PR. The current iteration of that PR is on the basis that the removal is stalled while the test suite issues get fixed (and so I'd rather we had the latest setuptools version in the meantime). |
Oh, the test suite was fixed in a separate PR. :) |
Cool, I'll update the PR when python/cpython#101039 gets merged (I'd have to anyway as my PR would get merge conflicts 🙂) |
So what should we move forward with this? It seems like a bad idea for us to suddenly deprecate eggs in a point release, so maybe it’d be better to roll back the |
I will revert and issue a 23.1.1 bug fix release in a few days (in case there are any other bug fixes to include). For 23.2, we can have a separate discussion. The unconditional deprecation of |
Seems like the downgrade of Thanks for the quick resolution 🙌 |
Description
d7e0248 bumped
setuptools
introducing a deprecation warning"pkg_resources is deprecated as an API"
.I don't see a way of making pip not run into it. With env variable
_PIP_USE_IMPORTLIB_METADATA
set, trying to install something withpip
, I getwithout, I get
Expected behavior
I'd like there to be a way to invoke pip such that it does not emit any warnings (unless of course some package relies on legacy setup methods or other valid warning cases).
That way, I can run pip with warnings as errors in my CI and actually notice when I run into deprecations.
pip version
23.1
Python version
3.10.10
OS
Linux
How to Reproduce
python -m install pip==23.1
python -W error -m pip freeze
Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: