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

Upgrade to pip 20.2 #1909

Merged
merged 1 commit into from
Jul 29, 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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.1
rev: v2.7.2
hooks:
- id: pyupgrade
- repo: https://github.com/asottile/seed-isort-config
Expand All @@ -25,7 +25,7 @@ repos:
- id: seed-isort-config
args: [--application-directories, '.:src']
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.1.4
rev: v5.2.0
hooks:
- id: isort
- repo: https://github.com/ambv/black
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/1909.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade embedded pip from version ``20.1.2`` to ``20.2`` - by :user:`gaborbernat`.
14 changes: 7 additions & 7 deletions src/virtualenv/seed/wheels/embed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
BUNDLE_FOLDER = Path(__file__).absolute().parent
BUNDLE_SUPPORT = {
"3.10": {
"pip": "pip-20.1.1-py2.py3-none-any.whl",
"pip": "pip-20.2-py2.py3-none-any.whl",
"setuptools": "setuptools-49.2.0-py3-none-any.whl",
"wheel": "wheel-0.34.2-py2.py3-none-any.whl",
},
"3.9": {
"pip": "pip-20.1.1-py2.py3-none-any.whl",
"pip": "pip-20.2-py2.py3-none-any.whl",
"setuptools": "setuptools-49.2.0-py3-none-any.whl",
"wheel": "wheel-0.34.2-py2.py3-none-any.whl",
},
"3.8": {
"pip": "pip-20.1.1-py2.py3-none-any.whl",
"pip": "pip-20.2-py2.py3-none-any.whl",
"setuptools": "setuptools-49.2.0-py3-none-any.whl",
"wheel": "wheel-0.34.2-py2.py3-none-any.whl",
},
"3.7": {
"pip": "pip-20.1.1-py2.py3-none-any.whl",
"pip": "pip-20.2-py2.py3-none-any.whl",
"setuptools": "setuptools-49.2.0-py3-none-any.whl",
"wheel": "wheel-0.34.2-py2.py3-none-any.whl",
},
"3.6": {
"pip": "pip-20.1.1-py2.py3-none-any.whl",
"pip": "pip-20.2-py2.py3-none-any.whl",
"setuptools": "setuptools-49.2.0-py3-none-any.whl",
"wheel": "wheel-0.34.2-py2.py3-none-any.whl",
},
"3.5": {
"pip": "pip-20.1.1-py2.py3-none-any.whl",
"pip": "pip-20.2-py2.py3-none-any.whl",
"setuptools": "setuptools-49.2.0-py3-none-any.whl",
"wheel": "wheel-0.34.2-py2.py3-none-any.whl",
},
Expand All @@ -41,7 +41,7 @@
"wheel": "wheel-0.33.6-py2.py3-none-any.whl",
},
"2.7": {
"pip": "pip-20.1.1-py2.py3-none-any.whl",
"pip": "pip-20.2-py2.py3-none-any.whl",
"setuptools": "setuptools-44.1.1-py2.py3-none-any.whl",
"wheel": "wheel-0.34.2-py2.py3-none-any.whl",
},
Expand Down
Binary file not shown.
2 changes: 2 additions & 0 deletions tests/unit/seed/wheels/test_periodic_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,13 @@ def _release(of, context):
u_log = UpdateLog(started=last_update, completed=last_update, versions=[], periodic=True)
read_dict = mocker.patch("virtualenv.app_data.via_disk_folder.JSONStoreDisk.read", return_value=u_log.to_dict())
write = mocker.patch("virtualenv.app_data.via_disk_folder.JSONStoreDisk.write")
copy = mocker.patch("virtualenv.seed.wheels.periodic_update.copy2")

versions = do_update("pip", "3.9", str(pip_version_remote[-1][0]), str(app_data_outer), [str(extra)], True)

assert download_wheel.call_count == len(pip_version_remote)
assert url_o.call_count == 1
assert copy.call_count == 1

expected = [
NewVersion(Path(wheel).name, _UP_NOW, None if release is None else release.replace(microsecond=0))
Expand Down
66 changes: 30 additions & 36 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
[tox]
minversion = 3.14.0
envlist =
fix_lint,
py38,
py37,
py36,
py35,
py34,
py27,
pypy,
pypy3,
coverage,
readme,
docs,
fix_lint
py38
py37
py36
py35
py34
py27
pypy
pypy3
coverage
readme
docs
isolated_build = true
skip_missing_interpreters = true

[testenv]
description = run tests with {basepython}
deps =
pip >= 20.0.2
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
COVERAGE_PROCESS_START = {toxinidir}/.coveragerc
Expand All @@ -34,7 +32,7 @@ commands =
python -m coverage erase
python -m coverage run -m pytest \
--junitxml {toxworkdir}/junit.{envname}.xml \
tests {posargs:--int --timeout 600 -n {env:PYTEST_XDIST:auto}}
{posargs:tests --int --timeout 600 -n {env:PYTEST_XDIST:auto}}

python -m coverage combine
python -m coverage report --skip-covered --show-missing
Expand All @@ -45,9 +43,8 @@ commands =
description = [run locally after tests]: combine coverage data and create report;
generates a diff coverage against origin/master (can be changed by setting DIFF_AGAINST env var)
deps =
{[testenv]deps}
coverage >= 5.0.1, <6
diff_cover
coverage >= 5.0.1
diff_cover >= 3
extras =
skip_install = True
passenv = DIFF_AGAINST
Expand All @@ -60,14 +57,14 @@ commands =
python -m coverage html -d {toxworkdir}/htmlcov
python -m diff_cover.diff_cover_tool --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml
depends =
py38,
py37,
py36,
py35,
py34,
py27,
pypy,
pypy3,
py38
py37
py36
py35
py34
py27
pypy
pypy3
parallel_show_output = True

[testenv:docs]
Expand All @@ -82,13 +79,13 @@ commands =
[testenv:readme]
description = check that the long description is valid (need for PyPI)
deps =
{[testenv]deps}
twine >= 1.12.1
pep517 >= 0.8.2
skip_install = true
extras =
commands =
pip wheel -w {envtmpdir}/build --no-deps .
twine check {envtmpdir}/build/*
python -m pep517.build -o {envtmpdir} -b -s .
twine check {envtmpdir}/*

[testenv:upgrade]
description = upgrade pip/wheels/setuptools to latest
Expand All @@ -103,8 +100,8 @@ commands = python upgrade_wheels.py
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
basepython = python3.8
passenv = *
deps = {[testenv]deps}
pre-commit >= 2.0.0, <3
deps =
pre-commit >= 2
skip_install = True
commands =
pre-commit run --all-files --show-diff-on-failure
Expand All @@ -131,8 +128,7 @@ description = do a release, required posarg of the version number
basepython = python3.8
passenv = *
deps =
{[testenv]deps}
gitpython >= 3.0.0, < 4
gitpython >= 3
towncrier >= 19.9.0rc1
packaging >= 17.1
changedir = {toxinidir}/tasks
Expand All @@ -144,7 +140,6 @@ description = generate a DEV environment
extras = testing, docs
usedevelop = True
deps =
{[testenv]deps}
{[testenv:release]deps}
setuptools_scm[toml]>=3.4
commands =
Expand All @@ -155,7 +150,6 @@ commands =
description = generate a zipapp
skip_install = true
deps =
{[testenv]deps}
packaging >= 20.0.0
packaging >= 20
commands =
python tasks/make_zipapp.py