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

Fix compatibility with pip master (pip>=20.0) #978

Merged
merged 2 commits into from
Nov 7, 2019

Conversation

atugushev
Copy link
Member

@atugushev atugushev commented Nov 4, 2019

Moved RequirementPreparer.session to Resolver.session. See pypa/pip#7290

Failed job: https://github.com/jazzband/pip-tools/commit/4dee581f2603e21271e9c7b38830507ed749357b/checks?check_suite_id=294004753

Changelog-friendly one-liner: Add compatibility with pip>=20.0.

Contributor checklist
  • Provided the tests for the changes.
  • Gave a clear one-line description in the PR (that the maintainers can add to CHANGELOG.md on release).
  • Assign the PR to an existing or new milestone for the target version (following Semantic Versioning).

Moved `RequirementPreparer.session` to `Resolver.session`.

See pypa/pip#7290
@atugushev atugushev added this to the 4.3.0 milestone Nov 4, 2019
@atugushev
Copy link
Member Author

@vphilippon PyPIRepository.resolve_reqs getting uglier version by version 😒

@codecov
Copy link

codecov bot commented Nov 4, 2019

Codecov Report

Merging #978 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #978      +/-   ##
==========================================
+ Coverage   99.31%   99.31%   +<.01%     
==========================================
  Files          34       34              
  Lines        2346     2350       +4     
  Branches      303      305       +2     
==========================================
+ Hits         2330     2334       +4     
  Misses          8        8              
  Partials        8        8
Impacted Files Coverage Δ
piptools/repositories/pypi.py 95.5% <100%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4dee581...fa2c479. Read the comment docs.

@@ -219,8 +223,7 @@ def resolve_reqs(self, download_dir, ireq, wheel_cache):
if PIP_VERSION < (19, 4):
resolver.require_hashes = require_hashes
results = resolver._resolve_one(reqset, ireq)
else: # pragma: no cover
# TODO remove pragma after pip==19.4 being released
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR, this change addressed to #953 (comment).

Copy link
Member

@codingjoe codingjoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and yes, it does get messy with all those cases per version. We really need to drop some version 😉

@atugushev atugushev merged commit 69e4142 into jazzband:master Nov 7, 2019
@atugushev atugushev deleted the compat-pip-19.4-pr-7290 branch November 7, 2019 04:48
@atugushev
Copy link
Member Author

@codingjoe thanks!

@atugushev atugushev changed the title Fix compatibility with pip master (pip>=19.4) Fix compatibility with pip master (pip>=20.0) Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants