diff --git a/1594.patch b/1594.patch new file mode 100644 index 0000000..3effeec --- /dev/null +++ b/1594.patch @@ -0,0 +1,52 @@ +From f9f51984e14d5d970950d10a8edff5f000196949 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Tue, 2 Jun 2020 19:27:53 +0200 +Subject: [PATCH] Allow both pre- and post- PEP 610 outputs in + test_venv_special_chars_issue252 + +pip 20.1+ supports PEP 610 https://www.python.org/dev/peps/pep-0610/ +Hence the output is changed a bit. +This was acknowledged in 553d6f282119481cbd4cf2a78e633eb8b506659e. + +Here we allow to run the tests with pip 19.3.x again +by relaxing the regex to match both the old and the new format. +--- + docs/changelog/1594.misc.rst | 1 + + tests/unit/test_z_cmdline.py | 2 +- + tox.ini | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + create mode 100644 docs/changelog/1594.misc.rst + +diff --git a/docs/changelog/1594.misc.rst b/docs/changelog/1594.misc.rst +new file mode 100644 +index 000000000..f945be2e2 +--- /dev/null ++++ b/docs/changelog/1594.misc.rst +@@ -0,0 +1 @@ ++Allow to run the tests with pip 19.3.1 once again while preserving the ability to use pip 20.1 - by :user:`hroncok` +diff --git a/tests/unit/test_z_cmdline.py b/tests/unit/test_z_cmdline.py +index 291ef4463..7f3b816d8 100644 +--- a/tests/unit/test_z_cmdline.py ++++ b/tests/unit/test_z_cmdline.py +@@ -337,7 +337,7 @@ def test_venv_special_chars_issue252(cmd, initproj): + ) + result = cmd() + result.assert_success() +- pattern = re.compile("special&&1 installed: .*pkg123 @ .*-0.7.zip.*") ++ pattern = re.compile(r"special&&1 installed: .*pkg123( @ .*-|==)0\.7(\.zip)?.*") + assert any(pattern.match(line) for line in result.outlines), "\n".join(result.outlines) + + +diff --git a/tox.ini b/tox.ini +index 723bd788a..4e2420c4a 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -31,7 +31,7 @@ passenv = + PYTEST_* + PIP_CACHE_DIR + deps = +- pip >= 20.1 ++ pip >= 19.3.1 + extras = testing + commands = pytest \ + --cov "{envsitepackagesdir}/tox" \ diff --git a/python-tox.spec b/python-tox.spec index 63a565c..c20c01c 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -15,6 +15,9 @@ License: MIT URL: https://tox.readthedocs.io/ Source0: %{pypi_source} +# Allow to run the tests with pip 19.3.1 +Patch1: https://github.com/tox-dev/tox/pull/1594.patch + BuildArch: noarch %description