diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ef63e22d..c199640e2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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 diff --git a/docs/changelog/1909.bugfix.rst b/docs/changelog/1909.bugfix.rst new file mode 100644 index 000000000..8edfee025 --- /dev/null +++ b/docs/changelog/1909.bugfix.rst @@ -0,0 +1 @@ +Upgrade embedded pip from version ``20.1.2`` to ``20.2`` - by :user:`gaborbernat`. diff --git a/src/virtualenv/seed/wheels/embed/__init__.py b/src/virtualenv/seed/wheels/embed/__init__.py index ef887fa8c..fcdfa19f3 100644 --- a/src/virtualenv/seed/wheels/embed/__init__.py +++ b/src/virtualenv/seed/wheels/embed/__init__.py @@ -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", }, @@ -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", }, diff --git a/src/virtualenv/seed/wheels/embed/pip-20.1.1-py2.py3-none-any.whl b/src/virtualenv/seed/wheels/embed/pip-20.2-py2.py3-none-any.whl similarity index 54% rename from src/virtualenv/seed/wheels/embed/pip-20.1.1-py2.py3-none-any.whl rename to src/virtualenv/seed/wheels/embed/pip-20.2-py2.py3-none-any.whl index ea1d0f7c8..ce0ef7565 100644 Binary files a/src/virtualenv/seed/wheels/embed/pip-20.1.1-py2.py3-none-any.whl and b/src/virtualenv/seed/wheels/embed/pip-20.2-py2.py3-none-any.whl differ diff --git a/tests/unit/seed/wheels/test_periodic_update.py b/tests/unit/seed/wheels/test_periodic_update.py index e5084fb2e..fab187688 100644 --- a/tests/unit/seed/wheels/test_periodic_update.py +++ b/tests/unit/seed/wheels/test_periodic_update.py @@ -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)) diff --git a/tox.ini b/tox.ini index c15271a4a..a4203d32f 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -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 @@ -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 @@ -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] @@ -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 @@ -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 @@ -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 @@ -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 = @@ -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