-
Notifications
You must be signed in to change notification settings - Fork 300
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
Drop run-time version constraints for modern pip #211
base: main
Are you sure you want to change the base?
Conversation
f710fdb
to
91fca47
Compare
@pradyunsg I don't suppose you'd have a spare moment to review? I'd like to open a PR to resolve #200, but it will conflict this this PR, so it would be great to get this PR merged before I do that if possible :-) |
Gentle two month nudge for review :-) |
I see this now @edmorley! 🙈 To be honest, I'm unlikely to have free cycles to take a closer look and land this anytime soon (I wanna let #213 get through before coming back around to this, and I go on vacation starting this weekend... which means this will slip past my visual range soon-enough!). I did take a cursory look now and it LGTM based on that -- but I'd like to take a proper look before landing this. Alternatively, someone else with the commit bit is welcome to land this! |
@pradyunsg Totally understand, no worries! I don't suppose we could merge this separate typo fix PR in the meantime (so I can then rebase this PR on top of main after it merges): |
64d90fd
to
ea6890a
Compare
I've rebased on |
ea6890a
to
9e55ac3
Compare
9e55ac3
to
3f0dddd
Compare
e01592c
to
a2eb69d
Compare
I've rebased this on |
I don't suppose someone has a moment to review? :-) |
a2eb69d
to
8469a52
Compare
Rebased again. Could someone review? :-) (This PR has been open for 6 months) |
@sbidoul Any concerns with landing this? If you don't have any concerns related to 24.3, let's land this now? |
@pradyunsg I can't say I looked in details to understand all the implications of this, but if it looks good to you and if @edmorley is around to help in case of problem with the next pip release (which could be soon depending on the conclusion of pypa/pip#13053), then feel free to merge ;) |
Modern pip (v9.0.0+) supports `Requires-Python` and so automatically takes the current Python version into account, when determining the latest version of packages that can be installed. As such, for modern pip we don't need to specify version range constraints for the pip/setuptools/wheel versions passed to the `pip install` at `get-pip.py` run-time. This is the first step towards being able to remove `SCRIPT_CONSTRAINTS` and rely purely on `Requires-Python` metadata, per: pypa#88 (comment) I've intentionally left the "figure out what pip version to embed in the template" part of template generation alone for now to keep the PR smaller, and have only changed the run-time `pip install` parts. I had to add a new `pre-9.py` template file (created as a copy of `pre-10.py`), since it's only pip<9 that needs the various version constraint references in the template (and otherwise anything else that used `pre-10.py`, such as Python 2.6, would have had redundant version constraints). The new `pre-9.py` template is only used for Python 3.2.
8469a52
to
29220ec
Compare
Modern Pip (v9.0.0+) supports
Requires-Python
and so automatically takes the current Python version into account, when determining the latest version of packages that can be installed.As such, for modern Pip we don't need to specify version range constraints for the pip/setuptools/wheel versions passed to the
pip install
atget-pip.py
run-time.This is the first step towards being able to remove
SCRIPT_CONSTRAINTS
and rely purely onRequires-Python
metadata, per: #88 (comment)I've intentionally left the "figure out what Pip version to embed in the template" part of template generation alone for now to keep the PR smaller, and have only changed the run-time
pip install
parts.I had to add a new
pre-9.py
template file (created as a copy ofpre-10.py
), since it's only pip<9 that needs the various version constraint references in the template (and otherwise anything else that usedpre-10.py
, such as Python 2.6, would have had redundant version constraints). The newpre-9.py
template is only used for Python 3.2.