-
-
Notifications
You must be signed in to change notification settings - Fork 635
Implement compatibility with pip 25.3 #2253
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
Conversation
|
I don't think a test is required as it's a bugfix that depends on upstream pip. If I do need to include a test, say the word and I will give it a go. |
|
closes #2252 |
webknjaz
left a comment
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.
Thanks for starting this effort!
Here's a few other things that are required to make this mergeable:
- Bump 25.2 to 25.3 in the supported marker in
tox.ini— so that we're actually testing this change in CI - Deprecate the
--use-pep517, at least when pip is 25.3+ with a plan to drop in from the user-facing CLI later. Add adeprecationchange note about this. - Have a regression test for the change or make sure that it is already covered elsewhere (having the CLI setting true/false); plus a test for the deprecation.
I have bumped. Could you provide some guidance for the deprecation? The use-pep517 option was never explicitly supported and thus, is never actually mentioned. I will check the tests whenever the |
@shifqu are you saying this is coming from
I approved the CI run and it's now evident that a bunch of other tests are failing. Things like P.S. Note that if you're planning to stick around and get involved more, you can log in at https://jazzband.co to join the org. This will result in you not having to go through the CI approvals. Alternatively, if you get some other small PR merged, GH will stop requiring approvals in your following PRs too. |
|
@shifqu FYI you should be able to reproduce the failures locally with something like |
c7cf286 to
0a5a68d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Indeed, this is coming from pip-args. I will check to see where exactly we can warn or error out.
Thanks, I have joined jazzband and ran the CI. Still some failures, but they are somewhat cryptic to me. The global_options one was very clear, but here it just says pip has failed. I am looking into it locally though, as I can reproduce there. |
Yeah, I find it a bit annoying having to go through the Click testing layer when things fail. Here's how the CLI entrypoints are invoked: https://click.palletsprojects.com/en/stable/testing/ / https://click.palletsprojects.com/en/stable/api/#testing. Sometimes, running a single test with |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b172e9e to
4a6b1dc
Compare
|
So locally I have found out that for some tests the output is |
|
@shifqu not sure — do you have a log to post? Any isolated repro? |
|
@webknjaz yes -- I have rebased the rerun failed tests in this PR and the outputs show the same thing. For tests with legacy resolver the setuptools error is present, for backtracking resolver tests, it shows a more generic, less useful error. To reproduce locally with pdb I used the same command you suggested: The commands are for the failing tests I pasted above. One for backtracking and one for legacy respectively. Unfortunately I am unable to make much of these errors as I don't have a very good understanding of the tests (yet) Edit: |
pip 25.2 ships with Python 3.14.0. If we upgrade to 25.3 we run into an incompatibility between pip-tools and pip. See [1] for progress on fixing the incompatibility. See [2] for the GitHub action docs on pip-version. [1] jazzband/pip-tools#2253 [2] https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-the-pip-version-input
pip 25.2 ships with Python 3.14.0. If we upgrade to 25.3 we run into an incompatibility between pip-tools and pip. See [1] for progress on fixing the incompatibility. See [2] for the GitHub action docs on pip-version. [1] jazzband/pip-tools#2253 [2] https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-the-pip-version-input
|
I think we should go after adding the missing pragmas, get to 100% coverage, and then come back here to ask for a rebase. I wanted to insulate this PR from "unrelated" infrastructure changes, but I just don't think it's possible since codecov is getting stuck here. |
|
@sirosen we could get #2268 in and then rebase, w/o blocking on the plugin/infra changes. This hopefully will get that single job a fraction of a percent to reach desired coverage. Alternatively, we could go for dropping Python 3.8 before this PR (although, that would mean this change would land in/post a major release rather than a minor). I don't have strong opinions but these are the options that seem awailable rn. |
|
Oh wait.. It just occurred to me that we could set |
ea4ab48 to
a1918eb
Compare
After reading up on GHA environment variables, I added a conditional step that sets the options for 3.8. I hope it's how you had envisioned it. And I also hope the tests pass now :D |
|
@shifqu I'll take a closer look later but meanwhile, combining related commits sounds lovely. |
| if: matrix.python-version == '3.8' | ||
| shell: bash | ||
| run: | | ||
| echo "PYTEST_ADDOPTS=--cov-fail-under=98" >> $GITHUB_ENV |
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.
I added a conditional step that sets the options for 3.8. I hope it's how you had envisioned it.
Not precisely what I had in mind but I guess it'll do. This sets the env var for the entire job (the rest of the steps). I originally thought that I'd scope it to one single step as follows:
env:
PYTEST_ADDOPTS: >-
${{
matrix.python-version == '3.8'
&& '--cov-fail-under=98'
|| ''
}}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.
I had thought about it, but the syntax is more obscure (IMO) and now we effectively see in the gha report whether or not the pytest_addopts step was skipped or not.
I do understand that having it scoped would entirely remove the possibility of having conflicts in further steps. However, I don't think the pytest_addopts variable will cause conflicts any time soon.
In any case, I will let you decide, @webknjaz, would you like me to scope it to the single step or do I leave it like this?
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.
I think that with us thinking of dropping Python 3.8 soon after, we can keep it and not overthink — it'll be removed anyway.
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.
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.
@shifqu these threads are difficult to dig up so I sometimes intentionally leave them unresolved for visibility. I'll mark this one as such.
This is done because pip 25.3 removed the pep517 options and uses this by default. global_option and build_option is also removed from pip Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Tests using MINIMAL_WHEELS_PATH have also been updated to use this new session-scoped fixture Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
The user is warned when they pass any arguments that are no longer supported for their used pip-version. These unsupported arguments will also be ignored by pip-tools Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
a1918eb to
b7e8f9b
Compare
Reduced it to 6 commits, which is nicer for the commit history, hehe. |
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
sirosen
left a comment
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.
@shifqu, thank you so much for picking this body of work up and sticking with it through the issues that cropped up along the way!
There's only one thing I want to double-check (commented inline) before we merge. After that, I'll see what we want to add for v7.5.2 and what we feel can wait for a later version, and we'll ship the fix! 🚀
| if: matrix.python-version == '3.8' | ||
| shell: bash | ||
| run: | | ||
| echo "PYTEST_ADDOPTS=--cov-fail-under=98" >> $GITHUB_ENV |
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.
I have all sorts of thoughts about improvements (including ones we're working on!), but I'm okay with this as a current solution that gets us unblocked.
@webknjaz, I want to confirm that you're also alright with this solution before we merge. For that reason I'm not yet adding this to the merge-queue.
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.
@sirosen, and a big thanks to you (and @webknjaz) for the reviews and patience exercised. What seemed like an easy fix did indeed crop up quite some issues along the way. But I am very happy to have been able to work on this PR. Quite some lessons learned wrt open source contributing! So thanks again.
Looking forward to seeing this be merged 🚀
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.
Yeah, I actually said that it's fine but that thread go collapsed and isn't as visible.
FWIW, other people can't reset blocking reviews in PRs so I'll go ahead and change it to approved.
webknjaz
left a comment
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.
@shifqu thanks for working on this with us so thoroughly!
Removed
use_pep517reference to enable compatibility with pip 25.3+Resolves #2252.
Contributor checklist
changelog.d/(seechangelog.d/README.mdfor instructions) or the PR text says "no changelog needed".Maintainer checklist
skip-changeloglabel.