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

Add pip>=20.2 support #1168

Merged
merged 2 commits into from
Jul 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- 3.7
pip-version:
- "latest"
- "20.2" # TODO: update to 20.1 after pip-20.2 being released
- "20.0"
include:
- os: Ubuntu
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ python:

env:
# NOTE: keep this in sync with envlist in tox.ini for tox-travis.
- PIP=20.0
- PIP=latest
- PIP=20.2 # TODO: update to 20.1 after pip-20.2 being released
- PIP=20.0

cache: false
install:
Expand Down
5 changes: 4 additions & 1 deletion piptools/repositories/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ def resolve_reqs(self, download_dir, ireq, wheel_cache):
)

reqset = RequirementSet()
ireq.is_direct = True
if PIP_VERSION[:2] <= (20, 1):
ireq.is_direct = True
else:
ireq.user_supplied = True
reqset.add_requirement(ireq)

resolver = self.command.make_resolver(
Expand Down
9 changes: 7 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
# NOTE: keep this in sync with the env list in .travis.yml for tox-travis.
py{27,35,36,37,38,39,py,py3}-pip{20.0,20.1,latest,master}-coverage
py{27,35,36,37,38,39,py,py3}-pip{20.0,20.1,20.2,latest,master}-coverage
checkqa
readme
skip_missing_interpreters = True
Expand All @@ -12,13 +12,17 @@ extras =
coverage: coverage
deps =
pipmaster: -e git+https://github.com/pypa/pip.git@master#egg=pip
; TODO: remove all 20.0 mentions after pip-20.2 being released
pip20.0: pip==20.0.*
pip20.1: pip~=20.1b1
pip20.1: pip==20.1.*
; TODO: change to pip==20.2.* after pip-20.2 being released
pip20.2: -e git+https://github.com/pypa/pip.git@master#egg=pip
setenv =
piplatest: PIP=latest
pipmaster: PIP=master
pip20.0: PIP==20.0
pip20.1: PIP==20.1
pip20.2: PIP==20.2

coverage: PYTEST_ADDOPTS=--strict --doctest-modules --cov --cov-report=term-missing --cov-report=xml {env:PYTEST_ADDOPTS:}
commands_pre =
Expand All @@ -44,5 +48,6 @@ commands = twine check {distdir}/*
PIP =
20.0: pip20.0
20.1: pip20.1
20.2: pip20.2
latest: piplatest
master: pipmaster