-
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 the vendored packaging
to 22.0+
#11715
Comments
For this, my thought process is that we do this in the span of a 3 month deprecation before removal; where One behaviour that I'm flip-flopping on: Should we skip wheels / sdists that contain requirements with this value in the dependency resolver, or should we reject them with an error? |
packaging
to 22.0+packaging
to 22.0+
My two cents is if they are the best version that can be resolved, error makes sense. If best version is something else, ignore. Does that make the best version resolution too slow? |
Just a note, since https://github.com/pypa/packaging/pull/607/files was merged and wheel and meson-python have updated to include those changes, locally built packages can no longer be installed on GraalPy unless we downgrade wheel and meson-python. The linked PR changed the abi tag for GraalPy. Just leaving this note here to say I wouldn't mind if pip updated it's vendored packaging at some point :) |
I was (briefly) looking at deprecating LegacyVersion and LegacySpecifier. Doing it in pip sounds non trivial. One thing that may be easier is to surface the two deprecation warnings that are already present in our vendored copy of One hurdle I face, though, is actually finding examples of usages of these that actually work with pip |
Oh! We bumped ❯ python -X dev -m pip install "pip>=23.0.*"
/Users/pradyunsg/Developer/github/pip/src/pip/_vendor/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
/Users/pradyunsg/Developer/github/pip/src/pip/_vendor/packaging/specifiers.py:255: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
warnings.warn(
Requirement already satisfied: pip>=23.0.* in ./.venv/lib/python3.11/site-packages (23.1.dev0) Running with |
We can patch these messages in our vendored ❯ pip install --dry-run "pip>=23.0.*"
DEPRECATION: This form of version specifier (>=23.0.*) has been deprecated. pip 23.2 will enforce this behaviour change. A possible replacement is use PEP 440 compliant version specifiers.
DEPRECATION: This version format (23.1.dev0) has been deprecated. pip 23.2 will enforce this behaviour change. A possible replacement is use PEP 440 compliant versions.
DEPRECATION: This version format (23.0.*) has been deprecated. pip 23.2 will enforce this behaviour change. A possible replacement is use PEP 440 compliant versions.
Requirement already satisfied: pip>=23.0.* in /home/sbi-local/.virtualenvs/tempenv-11a6272805892/lib/python3.8/site-packages (23.1.dev0) A bit chatty, but Why does it complain about |
I think the most important piece is to show #10550 function made some process toward reducing the complexity of implementing this on pip's end FWIW. Other than that, with 0fcd11f, we can create a similar function to wrap |
I'm wary of modifying our dependencies' source code to accomplish this FWIW -- the first bullet in our vendoring policy is...
And, notably, it would mean that downstream debundlers would have a copy of pip that won't behave as the same copy; because it won't have our patch. I am open to monkeypatching |
Quick update - where are we on this change? I'm assuming this (i.e., the change to update our vendored packaging) won't be going into 23.1. Is there any PR yet for the warnings that we need to get in place for the start of the deprecation cycle leading to the revendoring? I'm willing to be flexible with 23.1 to get that preparatory work in place, but if we don't even have a PR for it yet, is it realistic? Would a delay of a week (to 22/23 Apr) in 23.1 be of any practical help? (I have other personal reasons for being willing to slip a week, so it's not just for this work...) Ideally, can we either decide we're going to miss 23.1, or get a PR/issue created that can be put on the 23.1 milestone? |
@uranusjr and I spent some time chatting about this during PyCon and he spent some cycles looking into this. |
The concensus on this seems to be that we'll deprecate this and remove this (maybe in an expedited manner) and move ourselves forward with that. The current plan is to implement a wrapper function to handle caching and also the deprecation warning. |
An upgrade of references:
|
Filing an issue to track this since there's a lot of pieces involved as far as I can tell.
xref pypa/packaging#530
Needs:
Blocks:
pyparsing
's parser initialization at import time from `packaging.requirement)The text was updated successfully, but these errors were encountered: