-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Add support for pip>=22.0, drop support for Python 3.6 #1567
Conversation
Since pip no longer guarantees that it will no longer normalize underscore (_) in distribution names to dash (-) in `pip freeze`, `pip list`, and `pip show` (https://pip.pypa.io/en/stable/news/#id73) , in the interest of minimizing churn, pip-compile should normalize requirements names instead. This will ensure there are no changes to requirements files compiled with earlier versions of pip-tools/pip.
This test doesn't actually modify the requirements file, so update it to start with a normalized requirement name so it can continue to expect a normalized requirement name.
This is where we diverge from pip's output: pip no longer guarantees that it will canonicalize requirement names in `pip freeze` but we will continue to output canonicalized names.
RichPopStreamHandler didn't exist in pip<22 - feel free to take the commits from #1565 into this PR, taking this into account. |
f440c47
to
fd76111
Compare
@nicoa Thanks, I missed that the tests were being run across multiple |
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.
Thorough. Nicely done.
LGTM |
Anyone else think we should take the opportunity to replace the IMO |
I agree with you, which is what I did in my pull request. |
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.
seems using the github suggestion ui is not ideal. this line should be removed now:
line = str(ireq.req).lower()
Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This likely needs retitling, since the PR title goes into the changelog! |
Good point @pradyunsg, updated the title. |
Thanks @di! |
Thanks! |
Yes, this is expected, we're now fully canonicalizing every project name, so this is a one way change. Without this, many dashes would have changed back to underscores (but not all) and this would have changed in the compiled file depending on which underlying pip version was used. |
I am happy to see canonicalizing! My only concern was that this aspect was not directly visible under commit title so most will not see it. Sadly that change would likely to keep me busy for at least one day, considering number of affected projects. Until today I considered keeping pre-commit out of dependency lock as a good idea. Time to pay for own mistakes. |
The following comment is borrowed from this pull request, with changes: openedx/opaque-keys#218 This failure started happening in the automated requirements upgrade GitHub action: https://github.com/openedx/edx-submissions/runs/5704384647?check_suite_focus=true The bug was being caused by an interaction between pip and pip-tools, described here: jazzband/pip-tools#1558 The bug is fixed in pip-tools==6.5.0 - from this PR: jazzband/pip-tools#1567 This pull requests bumps the version of pip-tools manually to get the automated upgrades working again.
The following comment is borrowed from this pull request, with changes: openedx/opaque-keys#218 This failure started happening in the automated requirements upgrade GitHub action: https://github.com/openedx/edx-submissions/runs/5704384647?check_suite_focus=true The bug was being caused by an interaction between pip and pip-tools, described here: jazzband/pip-tools#1558 The bug is fixed in pip-tools==6.5.0 - from this pull request: jazzband/pip-tools#1567 This pull requests bumps the version of pip-tools manually to get the automated upgrades working again.
This PR consolidates all the changes necessary to update
pip-tools
forpip>=22.0
, namely:AssertionError
due to the newpip
console log handlerpip
's normalization changes in https://pip.pypa.io/en/stable/news/#id73Fixes #1558, closes #1559.
Fixes #1566.
Fixes #1562, closes #1560, closes #1561, closes #1564.
Contributor checklist
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.