__ test_pip_upgrade_from_source[https://github.com/pypa/pip/archive/main.zip] __
[gw0] linux -- Python 3.10.1 /home/runner/work/setuptools/setuptools/.tox/python/bin/python
pip_version = 'https://github.com/pypa/pip/archive/main.zip'
tmp_src = PosixPath('/tmp/pytest-of-runner/pytest-0/popen-gw0/test_pip_upgrade_from_source_h0/src')
virtualenv = <pytest_virtualenv.VirtualEnv object at 0x7f55d7f4e0b0>
@pytest.mark.skipif(
'platform.python_implementation() == "PyPy"',
reason="https://github.com/pypa/setuptools/pull/2865#issuecomment-965834995",
)
@pytest.mark.parametrize('pip_version', _get_pip_versions())
def test_pip_upgrade_from_source(pip_version, tmp_src, virtualenv):
"""
Check pip can upgrade setuptools from source.
"""
# Install pip/wheel, and remove setuptools (as it
# should not be needed for bootstraping from source)
if pip_version is None:
upgrade_pip = ()
else:
upgrade_pip = ('python -m pip install -U "{pip_version}" --retries=1',)
> virtualenv.run(' && '.join((
'pip uninstall -y setuptools',
'pip install -U wheel',
) + upgrade_pip).format(pip_version=pip_version))
setuptools/tests/test_virtualenv.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/python/lib/python3.10/site-packages/pytest_virtualenv.py:150: in run
return super(VirtualEnv, self).run(args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_virtualenv.VirtualEnv object at 0x7f55d7f4e0b0>
cmd = 'pip uninstall -y setuptools && pip install -U wheel && python -m pip install -U "https://github.com/pypa/pip/archive/main.zip" --retries=1'
capture = False, check_rc = True, cd = Path('/tmp/tmp8bipot1a'), shell = True
kwargs = {'env': {'COV_CORE_CONFIG': '/home/runner/work/setuptools/setuptools/.coveragerc', 'COV_CORE_DATAFILE': '/home/runner/work/setuptools/setuptools/.coverage', 'COV_CORE_SOURCE': ':', 'HOME': '/home/runner', ...}}
p = <Popen: returncode: 2 args: 'pip uninstall -y setuptools && pip install -U w...>
out = None, _ = None
err = CalledProcessError(2, 'pip uninstall -y setuptools && pip install -U wheel && python -m pip install -U "https://github.com/pypa/pip/archive/main.zip" --retries=1')
def run(self, cmd, capture=False, check_rc=True, cd=None, shell=False, **kwargs):
"""
Run a command relative to a given directory, defaulting to the workspace root
Parameters
----------
cmd : `str` or `list`
Command string or list. Commands given as a string will be run in a subshell.
capture : `bool`
Capture and return output
check_rc : `bool`
Assert return code is zero
cd : `str`
Path to chdir to, defaults to workspace root
"""
if isinstance(cmd, string_types):
shell = True
else:
# Some of the command components might be path objects or numbers
cmd = [str(i) for i in cmd]
if not cd:
cd = self.workspace
with cmdline.chdir(cd):
log.debug("run: {0}".format(cmd))
if capture:
p = subprocess.Popen(cmd, shell=shell, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kwargs)
else:
p = subprocess.Popen(cmd, shell=shell, **kwargs)
(out, _) = p.communicate()
if out is not None and not isinstance(out, string_types):
out = out.decode('utf-8')
if self.debug and capture:
log.debug("Stdout/stderr:")
log.debug(out)
if check_rc and p.returncode != 0:
err = subprocess.CalledProcessError(p.returncode, cmd)
err.output = out
if capture and not self.debug:
log.error("Stdout/stderr:")
log.error(out)
> raise err
E subprocess.CalledProcessError: Command 'pip uninstall -y setuptools && pip install -U wheel && python -m pip install -U "https://github.com/pypa/pip/archive/main.zip" --retries=1' returned non-zero exit status 2.
.tox/python/lib/python3.10/site-packages/pytest_shutil/workspace.py:132: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
created virtual environment CPython3.10.1.final.0-64 in 184ms
creator CPython3Posix(dest=/tmp/tmp8bipot1a/.env, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
added seed packages: pip==21.3.1, setuptools==58.3.0, wheel==0.37.0
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
----------------------------- Captured stdout call -----------------------------
Found existing installation: setuptools 58.3.0
Uninstalling setuptools-58.3.0:
Successfully uninstalled setuptools-58.3.0
Requirement already satisfied: wheel in ./.env/lib/python3.10/site-packages (0.37.0)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Attempting uninstall: wheel
Found existing installation: wheel 0.37.0
Uninstalling wheel-0.37.0:
Successfully uninstalled wheel-0.37.0
Successfully installed wheel-0.37.1
Collecting https://github.com/pypa/pip/archive/main.zip
Downloading https://github.com/pypa/pip/archive/main.zip (9.7 MB)
----------------------------- Captured stderr call -----------------------------
ERROR: Exception:
Traceback (most recent call last):
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
yield
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 519, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/http/client.py", line 465, in read
s = self.fp.read(amt)
File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/ssl.py", line 1273, in recv_into
return self.read(nbytes, buffer)
File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/ssl.py", line 1129, in read
return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 164, in exc_logging_wrapper
status = run_func(*args)
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 338, in run
requirement_set = resolver.resolve(
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 73, in resolve
collected = self.factory.collect_root_requirements(root_reqs)
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 468, in collect_root_requirements
req = self._make_requirement_from_install_req(
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 430, in _make_requirement_from_install_req
cand = self._make_candidate_from_link(
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 201, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 281, in __init__
super().__init__(
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 156, in __init__
self.dist = self._prepare()
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 225, in _prepare
dist = self._prepare_distribution()
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 292, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 527, in _prepare_linked_requirement
local_file = unpack_url(
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 213, in unpack_url
file = get_http_url(
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 94, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/network/download.py", line 145, in __call__
for chunk in chunks:
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/cli/progress_bars.py", line 144, in iter
for x in it:
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_internal/network/utils.py", line 63, in response_chunks
for chunk in response.raw.stream(
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 576, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 512, in read
with self._error_catcher():
File "/opt/hostedtoolcache/Python/3.10.1/x64/lib/python3.10/contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "/tmp/tmp8bipot1a/.env/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='codeload.github.com', port=443): Read timed out.
---------- coverage: platform linux, python 3.10.1-final-0 -----------
Coverage XML written to file coverage.xml
Today, tests started failing with this error: