diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-05 02:47:11 +0000 |
commit | 2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch) | |
tree | c8af0fd04194aed03cf067d44e53c7edd3e9ab84 /dev-python/pip/files | |
parent | e9d044d4b9b71200a96adfa280848858c0f468c9 (diff) |
gentoo resync : 05.12.2021
Diffstat (limited to 'dev-python/pip/files')
-rw-r--r-- | dev-python/pip/files/pip-21.1-no-coverage.patch | 51 | ||||
-rw-r--r-- | dev-python/pip/files/pip-21.3.1-cryptography-tests.patch | 39 |
2 files changed, 39 insertions, 51 deletions
diff --git a/dev-python/pip/files/pip-21.1-no-coverage.patch b/dev-python/pip/files/pip-21.1-no-coverage.patch deleted file mode 100644 index 5f9c836d32ea..000000000000 --- a/dev-python/pip/files/pip-21.1-no-coverage.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 66ca1e64ce3fb971ec30d5f8b2a0bda49721bc2d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Wed, 29 Jul 2020 07:42:25 +0200 -Subject: [PATCH] Disable coverage testing support inside test venvs - ---- - tests/conftest.py | 14 +------------- - 1 file changed, 1 insertion(+), 13 deletions(-) - -diff --git a/tests/conftest.py b/tests/conftest.py -index a53e0c4f7..c91d1e1ae 100644 ---- a/tests/conftest.py -+++ b/tests/conftest.py -@@ -315,11 +315,6 @@ def wheel_install(tmpdir_factory, common_wheels): - return _common_wheel_editable_install(tmpdir_factory, common_wheels, "wheel") - - --@pytest.fixture(scope="session") --def coverage_install(tmpdir_factory, common_wheels): -- return _common_wheel_editable_install(tmpdir_factory, common_wheels, "coverage") -- -- - def install_egg_link(venv, project_name, egg_info_dir): - with open(venv.site / "easy-install.pth", "a") as fp: - fp.write(str(egg_info_dir.resolve()) + "\n") -@@ -329,7 +324,7 @@ def install_egg_link(venv, project_name, egg_info_dir): - - @pytest.fixture(scope="session") - def virtualenv_template( -- request, tmpdir_factory, pip_src, setuptools_install, coverage_install -+ request, tmpdir_factory, pip_src, setuptools_install - ): - - if request.config.getoption("--use-venv"): -@@ -355,13 +350,6 @@ def virtualenv_template( - [venv.bin / "python", "setup.py", "-q", "develop"], cwd=pip_editable - ) - -- # Install coverage and pth file for executing it in any spawned processes -- # in this virtual environment. -- install_egg_link(venv, "coverage", coverage_install) -- # zz prefix ensures the file is after easy-install.pth. -- with open(venv.site / "zz-coverage-helper.pth", "a") as f: -- f.write("import coverage; coverage.process_startup()") -- - # Drop (non-relocatable) launchers. - for exe in os.listdir(venv.bin): - if not ( --- -2.31.1 - diff --git a/dev-python/pip/files/pip-21.3.1-cryptography-tests.patch b/dev-python/pip/files/pip-21.3.1-cryptography-tests.patch new file mode 100644 index 000000000000..1505d487ad40 --- /dev/null +++ b/dev-python/pip/files/pip-21.3.1-cryptography-tests.patch @@ -0,0 +1,39 @@ +From 8fa5d719a3c902ca9b6c9198229b7a67fecf8b8e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Fri, 26 Nov 2021 16:12:16 +0100 +Subject: [PATCH] Move cryptography-based imports into the fixture + +Move the imports that require cryptography into the cert_factory +fixture. This makes it possible to deselect these tests on systems +where cryptography cannot be installed. +--- + tests/conftest.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/tests/conftest.py b/tests/conftest.py +index 076aeaf19..bab6ab3f5 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -27,7 +27,6 @@ from pip._internal.cli.main import main as pip_entry_point + from pip._internal.locations import _USE_SYSCONFIG + from pip._internal.utils.temp_dir import global_tempdir_manager + from tests.lib import DATA_DIR, SRC_DIR, PipTestEnvironment, TestData +-from tests.lib.certs import make_tls_cert, serialize_cert, serialize_key + from tests.lib.path import Path + from tests.lib.server import MockServer as _MockServer + from tests.lib.server import make_mock_server, server_running +@@ -535,6 +534,11 @@ def deprecated_python() -> bool: + + @pytest.fixture(scope="session") + def cert_factory(tmpdir_factory: pytest.TempdirFactory) -> Callable[[], str]: ++ # Delay the import requiring cryptography in order to make it possible ++ # to deselect relevant tests on systems where cryptography cannot ++ # be installed. ++ from tests.lib.certs import make_tls_cert, serialize_cert, serialize_key ++ + def factory() -> str: + """Returns path to cert/key file.""" + output_path = Path(str(tmpdir_factory.mktemp("certs"))) / "cert.pem" +-- +2.34.1 + |