Gentoo Archives: gentoo-commits

From: Louis Sautier <sbraz@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pip/files/
Date: Fri, 26 Feb 2021 20:38:29
Message-Id: 1614371857.a84b6cf2d28766686b31ad16dc970095d44f760e.sbraz@gentoo
1 commit: a84b6cf2d28766686b31ad16dc970095d44f760e
2 Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
3 AuthorDate: Fri Feb 26 16:51:13 2021 +0000
4 Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 26 20:37:37 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a84b6cf2
7
8 dev-python/pip: remove unused patch
9
10 Package-Manager: Portage-3.0.14, Repoman-3.0.2
11 Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
12 Closes: https://github.com/gentoo/gentoo/pull/19670
13 Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
14
15 dev-python/pip/files/pip-20.2-no-coverage.patch | 163 ------------------------
16 1 file changed, 163 deletions(-)
17
18 diff --git a/dev-python/pip/files/pip-20.2-no-coverage.patch b/dev-python/pip/files/pip-20.2-no-coverage.patch
19 deleted file mode 100644
20 index 55be5b8c971..00000000000
21 --- a/dev-python/pip/files/pip-20.2-no-coverage.patch
22 +++ /dev/null
23 @@ -1,163 +0,0 @@
24 -From 43389903a55a5432ca8556f42fb2252c91c7ca45 Mon Sep 17 00:00:00 2001
25 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
26 -Date: Wed, 29 Jul 2020 07:42:25 +0200
27 -Subject: [PATCH] Revert "Add basic test coverage configuration"
28 -
29 -This is just PITA since coverage uses native C extensions.
30 ----
31 - .coveragerc | 4 +++
32 - setup.cfg | 38 ----------------------
33 - tests/conftest.py | 16 +--------
34 - tools/requirements/tests-common_wheels.txt | 2 --
35 - tox.ini | 16 ++-------
36 - 5 files changed, 7 insertions(+), 69 deletions(-)
37 - create mode 100644 .coveragerc
38 -
39 -diff --git a/.coveragerc b/.coveragerc
40 -new file mode 100644
41 -index 00000000..5f833c94
42 ---- /dev/null
43 -+++ b/.coveragerc
44 -@@ -0,0 +1,4 @@
45 -+[run]
46 -+branch = True
47 -+omit =
48 -+ src/pip/_vendor/*
49 -diff --git a/setup.cfg b/setup.cfg
50 -index 45fd58a3..e40596e9 100644
51 ---- a/setup.cfg
52 -+++ b/setup.cfg
53 -@@ -67,44 +67,6 @@ markers =
54 - yaml: yaml based tests
55 - fails_on_new_resolver: Does not yet work on the new resolver
56 -
57 --[coverage:run]
58 --branch = True
59 --# Do not gather coverage for vendored libraries.
60 --omit = */_vendor/*
61 --# Centralized absolute file prefix for coverage files.
62 --data_file = ${COVERAGE_OUTPUT_DIR}/.coverage
63 --# By default, each covered process will try to truncate and then write to
64 --# `data_file`, but with `parallel`, they will write to separate files suffixed
65 --# with hostname, pid, and a timestamp.
66 --parallel = True
67 --# If not set, then at the termination of each worker (when using pytest-xdist),
68 --# the following is traced: "Coverage.py warning: Module pip was previously
69 --# imported, but not measured (module-not-measured)"
70 --disable_warnings = module-not-measured
71 --
72 --[coverage:paths]
73 --# We intentionally use "source0" here because pytest-cov unconditionally sets
74 --# "source" after loading the config.
75 --source0 =
76 -- # The primary source code path which other paths will be combined into.
77 -- src/pip/
78 -- # Unit test source directory e.g.
79 -- # `.tox/coverage-py3/lib/pythonX.Y/site-packages/pip/...`
80 -- */site-packages/pip/
81 -- # Functional test virtual environment directories, which look like
82 -- # `tmpdir/pip0/pip/src/pip/...`
83 -- */pip/src/pip/
84 --
85 --[coverage:report]
86 --exclude_lines =
87 -- # We must re-state the default because the `exclude_lines` option overrides
88 -- # it.
89 -- pragma: no cover
90 -- # This excludes typing-specific code, which will be validated by mypy anyway.
91 -- if MYPY_CHECK_RUNNING
92 -- # Can be set to exclude e.g. `if PY2:` on Python 3
93 -- ${PIP_CI_COVERAGE_EXCLUDES}
94 --
95 - [bdist_wheel]
96 - universal = 1
97 -
98 -diff --git a/tests/conftest.py b/tests/conftest.py
99 -index 2aab5020..0db6d967 100644
100 ---- a/tests/conftest.py
101 -+++ b/tests/conftest.py
102 -@@ -294,13 +294,6 @@ def wheel_install(tmpdir_factory, common_wheels):
103 - 'wheel')
104 -
105 -
106 --@××××××.fixture(scope='session')
107 --def coverage_install(tmpdir_factory, common_wheels):
108 -- return _common_wheel_editable_install(tmpdir_factory,
109 -- common_wheels,
110 -- 'coverage')
111 --
112 --
113 - def install_egg_link(venv, project_name, egg_info_dir):
114 - with open(venv.site / 'easy-install.pth', 'a') as fp:
115 - fp.write(str(egg_info_dir.resolve()) + '\n')
116 -@@ -310,7 +303,7 @@ def install_egg_link(venv, project_name, egg_info_dir):
117 -
118 - @pytest.fixture(scope='session')
119 - def virtualenv_template(request, tmpdir_factory, pip_src,
120 -- setuptools_install, coverage_install):
121 -+ setuptools_install, common_wheels):
122 -
123 - if six.PY3 and request.config.getoption('--use-venv'):
124 - venv_type = 'venv'
125 -@@ -334,13 +327,6 @@ def virtualenv_template(request, tmpdir_factory, pip_src,
126 - subprocess.check_call([venv.bin / 'python', 'setup.py', '-q', 'develop'],
127 - cwd=pip_editable)
128 -
129 -- # Install coverage and pth file for executing it in any spawned processes
130 -- # in this virtual environment.
131 -- install_egg_link(venv, 'coverage', coverage_install)
132 -- # zz prefix ensures the file is after easy-install.pth.
133 -- with open(venv.site / 'zz-coverage-helper.pth', 'a') as f:
134 -- f.write('import coverage; coverage.process_startup()')
135 --
136 - # Drop (non-relocatable) launchers.
137 - for exe in os.listdir(venv.bin):
138 - if not (
139 -diff --git a/tools/requirements/tests-common_wheels.txt b/tools/requirements/tests-common_wheels.txt
140 -index f0edf0b0..6703d606 100644
141 ---- a/tools/requirements/tests-common_wheels.txt
142 -+++ b/tools/requirements/tests-common_wheels.txt
143 -@@ -7,5 +7,3 @@
144 -
145 - setuptools >= 40.8.0
146 - wheel
147 --# As required by pytest-cov.
148 --coverage >= 4.4
149 -diff --git a/tox.ini b/tox.ini
150 -index 82e9abc6..7a19ca61 100644
151 ---- a/tox.ini
152 -+++ b/tox.ini
153 -@@ -8,7 +8,6 @@ envlist =
154 - # Wrapper for calls to pip that make sure the version being used is the
155 - # original virtualenv (stable) version, and not the code being tested.
156 - pip = python {toxinidir}/tools/tox_pip.py
157 --mkdirp = python -c 'import os, sys; os.path.exists(sys.argv[1]) or os.mkdir(sys.argv[1])'
158 -
159 - [testenv]
160 - # Remove USERNAME once we drop PY2.
161 -@@ -31,20 +30,9 @@ commands = pytest --timeout 300 []
162 - install_command = {[helpers]pip} install {opts} {packages}
163 - list_dependencies_command = {[helpers]pip} freeze --all
164 -
165 --[testenv:coverage]
166 -+[testenv:coverage-py3]
167 - basepython = python3
168 --commands =
169 -- {[helpers]mkdirp} {toxinidir}/.coverage-output
170 -- pytest --timeout 300 --cov=pip --cov-config={toxinidir}/setup.cfg []
171 --
172 --setenv =
173 -- # Used in coverage configuration in setup.cfg.
174 -- COVERAGE_OUTPUT_DIR = {toxinidir}/.coverage-output
175 -- # Ensure coverage is enabled in child processes in virtual environments
176 -- # since they won't already have been enabled by pytest-cov.
177 -- COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
178 -- # Used in coverage configuration in setup.cfg.
179 -- PIP_CI_COVERAGE_EXCLUDES = if PY2
180 -+commands = pytest --timeout 300 --cov=pip --cov-report=term-missing --cov-report=xml --cov-report=html tests/unit {posargs}
181 -
182 - [testenv:docs]
183 - # Don't skip install here since pip_sphinxext uses pip's internals.
184 ---
185 -2.28.0
186 -