Skip to content
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

Expose setuptools and wheel version flags for use with non-vendored Pips. #1895

Closed
jsirois opened this issue Aug 26, 2022 · 8 comments · Fixed by #2514
Closed

Expose setuptools and wheel version flags for use with non-vendored Pips. #1895

jsirois opened this issue Aug 26, 2022 · 8 comments · Fixed by #2514

Comments

@jsirois
Copy link
Member

jsirois commented Aug 26, 2022

Right now these are hard-coded but it would be good to allow experimentation with these by end users:
https://github.com/pantsbuild/pex/blob/63592214c569c03b60c59766f96fdd2832e698b6/pex/pip/version.py#L77-L86

Pex does not rely on them in any direct way; so a user should be able to try out / pick up a bug fix in either or even downgrade when prodlems are discovered but not fixed.

@jsirois jsirois changed the title Expose setuptools ans wheel version flags for use with non-vendored Pips. Expose setuptools and wheel version flags for use with non-vendored Pips. Aug 26, 2022
@jsirois jsirois mentioned this issue Sep 20, 2022
1 task
@jsirois jsirois mentioned this issue Oct 9, 2022
2 tasks
This was referenced Oct 18, 2022
@jsirois jsirois mentioned this issue Nov 3, 2022
2 tasks
This was referenced Nov 21, 2022
@jsirois jsirois mentioned this issue Nov 28, 2022
2 tasks
This was referenced Dec 8, 2022
@jsirois jsirois mentioned this issue Jan 9, 2023
2 tasks
@jsirois jsirois mentioned this issue Jan 18, 2023
3 tasks
This was referenced Feb 12, 2023
This was referenced Feb 25, 2023
This was referenced Mar 7, 2023
@jsirois jsirois mentioned this issue Mar 23, 2023
2 tasks
@danxmoran
Copy link
Contributor

@jsirois as part of this, should we add setuptools_version and wheel_version to the lockfile schema? I've been working on threading the params through the code and just landed on Lockfile.create

@jsirois
Copy link
Member Author

jsirois commented May 1, 2023

@danxmoran I'm not sure. Can you supply a backtrace for the error you hit? (You may need PEX_VERBOSE=1 to expose this depending where you hit the error)

It's unclear to me exactly where the surgery is needed and there is a plan to do better for locks (include a sub-lock for every sdist that pins its build requirements). Also, can you confirm the full range of use cases you have. Is it just the class of sdists with 2to3 where you want to use new Pip, old setuptools & wheel or are there other cases?

@danxmoran
Copy link
Contributor

danxmoran commented May 3, 2023

@jsirois no error - I was trying my hand at implementing this by plumbing setuptools_version and wheel_version parameters through the code alongside the existing pip_version.

It's just this one use-case. Noted that we could work around the use_2to3 by forking the repository, we're just averse to it because we've ended up forgetting about / not maintaining the forks when we've taken that approach in the past.

EDIT: I found another case of use_2to3 in our dependency tree, this time in a transitive dependency of a package that we can't upgrade (for Reasons). I don't think the fork+VCS-req approach would save us from this new case.

@jsirois jsirois mentioned this issue May 4, 2023
1 task
@jsirois jsirois mentioned this issue May 13, 2023
2 tasks
@jsirois jsirois mentioned this issue Jul 1, 2023
3 tasks
This was referenced Jul 21, 2023
This was referenced Aug 3, 2023
@jsirois jsirois mentioned this issue Aug 12, 2023
1 task
This was referenced Aug 22, 2023
@jsirois jsirois mentioned this issue Sep 18, 2023
1 task
@jsirois jsirois mentioned this issue Sep 30, 2023
1 task
This was referenced Nov 2, 2023
@jsirois
Copy link
Member Author

jsirois commented Aug 21, 2024

In the meantime, --extra-pip-requirement was added in #2461 which just about solves this. The Pip installation module just needs to special case extra_requirements whose project name is setuptools or wheel and let these trump the requirements baked into the given Pip version selected.

@jsirois jsirois self-assigned this Aug 21, 2024
jsirois added a commit to jsirois/pex that referenced this issue Aug 21, 2024
When using non-vendored Pip (i.e.: specifying a custom `--pip-version`),
you can now override the versions of setuptools and wheel Pex bootstraps
for Pip with the existing `--extra-pip-requirement` option and the
override will be respected. Trying to override setuptools or wheel for
vendored Pip will raise an error however since its versions are
specialized to support all Pex resolve features under Python 2.7.

Fixes pex-tool#1895
jsirois added a commit to jsirois/pex that referenced this issue Aug 21, 2024
When using non-vendored Pip (i.e.: specifying a custom `--pip-version`),
you can now override the versions of setuptools and wheel Pex bootstraps
for Pip with the existing `--extra-pip-requirement` option and the
override will be respected. Trying to override setuptools or wheel for
vendored Pip will raise an error however since its versions are
specialized to support all Pex resolve features under Python 2.7.

Fixes pex-tool#1895
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
2 participants