diff options
Diffstat (limited to 'dev-python/pip/files')
-rw-r--r-- | dev-python/pip/files/pip-20.0.2-disable-system-install.patch | 29 | ||||
-rw-r--r-- | dev-python/pip/files/pip-22.1.1-test-version-check.patch | 30 | ||||
-rw-r--r-- | dev-python/pip/files/pip-23.1-no-coverage.patch (renamed from dev-python/pip/files/pip-21.3-no-coverage.patch) | 30 | ||||
-rw-r--r-- | dev-python/pip/files/pip-23.3.1-no-color.patch | 35 |
4 files changed, 50 insertions, 74 deletions
diff --git a/dev-python/pip/files/pip-20.0.2-disable-system-install.patch b/dev-python/pip/files/pip-20.0.2-disable-system-install.patch deleted file mode 100644 index e0b0034e407a..000000000000 --- a/dev-python/pip/files/pip-20.0.2-disable-system-install.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 3aee04cbb93c0e479b040e682b2aef676629c9a2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sat, 1 Feb 2020 09:14:46 +0100 -Subject: [PATCH] install: Raise an error to avoid breaking python-exec - -Running pip without --target, --prefix, --root, or --user will result -in packages being installed systemwide. This has a tendency to break -python-exec if setuptools gets installed or upgraded. ---- - src/pip/_internal/commands/install.py | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/pip/_internal/commands/install.py b/src/pip/_internal/commands/install.py -index 8c2c32fd..41bac878 100644 ---- a/src/pip/_internal/commands/install.py -+++ b/src/pip/_internal/commands/install.py -@@ -238,6 +238,9 @@ class InstallCommand(RequirementCommand): - if options.upgrade: - upgrade_strategy = options.upgrade_strategy - -+ if not options.use_user_site and not options.target_dir and not options.root_path and not options.prefix_path and not os.getenv('GENTOO_PIP_TESTING'): -+ raise CommandError("(Gentoo) Please run pip with the --user option to avoid breaking python-exec") -+ - cmdoptions.check_dist_restriction(options, check_target=True) - - install_options = options.install_options or [] --- -2.28.0 - diff --git a/dev-python/pip/files/pip-22.1.1-test-version-check.patch b/dev-python/pip/files/pip-22.1.1-test-version-check.patch deleted file mode 100644 index b3160b1ccad2..000000000000 --- a/dev-python/pip/files/pip-22.1.1-test-version-check.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 345c475efe2dee94ee327d99f729c8274b1f6047 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sun, 22 May 2022 08:40:32 +0200 -Subject: [PATCH] Pass --disable-pip-version-check in tests - -Pass `--disable-pip-version-check` when running pip from the test suite. -In the best case, these checks are unnecessary and in the worst, they -cause tests to fail by emitting warnings. - -Fixes https://github.com/pypa/pip/issues/11114 ---- - tests/lib/__init__.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/lib/__init__.py b/tests/lib/__init__.py -index c8d68fea9..d64cf1d53 100644 ---- a/tests/lib/__init__.py -+++ b/tests/lib/__init__.py -@@ -682,7 +682,7 @@ class PipTestEnvironment(TestFileEnvironment): - kwargs["allow_stderr_warning"] = True - if use_module: - exe = "python" -- args = ("-m", "pip") + args -+ args = ("-m", "pip", "--disable-pip-version-check") + args - else: - exe = "pip" - return self.run(exe, *args, **kwargs) --- -2.35.1 - diff --git a/dev-python/pip/files/pip-21.3-no-coverage.patch b/dev-python/pip/files/pip-23.1-no-coverage.patch index 8292f97f9488..943cc281cdfb 100644 --- a/dev-python/pip/files/pip-21.3-no-coverage.patch +++ b/dev-python/pip/files/pip-23.1-no-coverage.patch @@ -1,6 +1,6 @@ -From 8473691148031ed4db5bd8870fbeef9484b9c831 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> -Date: Sat, 23 Oct 2021 08:11:11 +0200 +From d915b0eec7b5844c06b5d8853544c8c5b538b0b9 Mon Sep 17 00:00:00 2001 +From: Arthur Zamarin <arthurzam@gentoo.org> +Date: Fri, 29 Jul 2022 14:06:03 +0300 Subject: [PATCH] Disable coverage testing support inside test venvs --- @@ -8,38 +8,38 @@ Subject: [PATCH] Disable coverage testing support inside test venvs 1 file changed, 15 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py -index 076aeaf19..77c41dc15 100644 +index 57dd7e68a..af2af9ffa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py -@@ -340,13 +340,6 @@ def wheel_install(tmpdir_factory: pytest.TempdirFactory, common_wheels: Path) -> +@@ -408,13 +408,6 @@ def wheel_install(tmpdir_factory: pytest.TempPathFactory, common_wheels: Path) - return _common_wheel_editable_install(tmpdir_factory, common_wheels, "wheel") -@pytest.fixture(scope="session") -def coverage_install( -- tmpdir_factory: pytest.TempdirFactory, common_wheels: Path +- tmpdir_factory: pytest.TempPathFactory, common_wheels: Path -) -> Path: - return _common_wheel_editable_install(tmpdir_factory, common_wheels, "coverage") - - - def install_egg_link( - venv: VirtualEnvironment, project_name: str, egg_info_dir: Path + def install_pth_link( + venv: VirtualEnvironment, project_name: str, lib_dir: Path ) -> None: -@@ -362,7 +355,6 @@ def virtualenv_template( - tmpdir_factory: pytest.TempdirFactory, +@@ -430,7 +423,6 @@ def virtualenv_template( pip_src: Path, setuptools_install: Path, + wheel_install: Path, - coverage_install: Path, ) -> Iterator[VirtualEnvironment]: - venv_type: VirtualEnvironmentType -@@ -389,13 +381,6 @@ def virtualenv_template( - [venv.bin / "python", "setup.py", "-q", "develop"], cwd=pip_editable + if request.config.getoption("--use-venv"): +@@ -457,13 +449,6 @@ def virtualenv_template( + [os.fspath(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) +- install_pth_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()") @@ -48,5 +48,5 @@ index 076aeaf19..77c41dc15 100644 for exe in os.listdir(venv.bin): if not ( -- -2.33.1 +2.40.0 diff --git a/dev-python/pip/files/pip-23.3.1-no-color.patch b/dev-python/pip/files/pip-23.3.1-no-color.patch new file mode 100644 index 000000000000..528e2c6cf465 --- /dev/null +++ b/dev-python/pip/files/pip-23.3.1-no-color.patch @@ -0,0 +1,35 @@ +From ad01e9c2a965d395c5902c8ad70c970c7631316b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sat, 25 Nov 2023 07:36:59 +0100 +Subject: [PATCH] Fix tests when NO_COLOR is set in the calling environment + +Add `FORCE_COLOR` and `NO_COLOR` variables to the `isolate()` fixture +to ensure that these two variables do not affect internal test output. +This fixes the following two test failures when pytest is called with +`NO_COLOR` set: + +``` +FAILED tests/unit/test_exceptions.py::TestDiagnosticPipErrorPresentation_ASCII::test_complete_color - AssertionError: assert '\x1b[1merror...ing harder.\n' == '\x1b[1;31mer...ing harder.\n' +FAILED tests/unit/test_exceptions.py::TestDiagnosticPipErrorPresentation_Unicode::test_complete_color - AssertionError: assert '\x1b[1merror...ing harder.\n' == '\x1b[1;31mer...ing harder.\n' +``` +--- + news/7ae28a10-04c4-4a1f-a276-4c9e04f2e0c1.trivial.rst | 0 + tests/conftest.py | 4 ++++ + 2 files changed, 4 insertions(+) + create mode 100644 news/7ae28a10-04c4-4a1f-a276-4c9e04f2e0c1.trivial.rst + +diff --git a/tests/conftest.py b/tests/conftest.py +index c5bf4bb9567..8d9eb029c79 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -318,6 +318,10 @@ def isolate(tmpdir: Path, monkeypatch: pytest.MonkeyPatch) -> None: + # Make sure tests don't share a requirements tracker. + monkeypatch.delenv("PIP_BUILD_TRACKER", False) + ++ # Make sure color control variables don't affect internal output. ++ monkeypatch.delenv("FORCE_COLOR", False) ++ monkeypatch.delenv("NO_COLOR", False) ++ + # FIXME: Windows... + os.makedirs(os.path.join(home_dir, ".config", "git")) + with open(os.path.join(home_dir, ".config", "git", "config"), "wb") as fp: |