From 0f699dcd4d3a74aeae19e7c61c150c037bf06213 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 18:01:34 -0500 Subject: [PATCH 1/3] In test_test_command_install_requirements, uninstall setuptools to avoid getting some other version in the environment. --- setuptools/tests/test_virtualenv.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 21dea5bb87..950c74c5d5 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -179,6 +179,8 @@ def test_test_command_install_requirements(virtualenv, tmpdir): # Ensure pip/wheel packages are installed. virtualenv.run( "python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"") + # uninstall setuptools so that 'setup.py develop' works + virtualenv.run("python -m pip uninstall -y setuptools") _check_test_command_install_requirements(virtualenv, tmpdir) From bc65372f3e3c73e7e16a3d3faf29dc0984752718 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 21:20:42 -0500 Subject: [PATCH 2/3] Disable index URL in pip-based fetch_build_eggs to avoid hitting PyPI. --- setuptools/tests/test_virtualenv.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setuptools/tests/test_virtualenv.py b/setuptools/tests/test_virtualenv.py index 950c74c5d5..5a942d84c5 100644 --- a/setuptools/tests/test_virtualenv.py +++ b/setuptools/tests/test_virtualenv.py @@ -181,6 +181,8 @@ def test_test_command_install_requirements(virtualenv, tmpdir): "python -c \"__import__('pkg_resources').require(['pip', 'wheel'])\"") # uninstall setuptools so that 'setup.py develop' works virtualenv.run("python -m pip uninstall -y setuptools") + # disable index URL so bits and bobs aren't requested from PyPI + virtualenv.env['PIP_NO_INDEX'] = '1' _check_test_command_install_requirements(virtualenv, tmpdir) From 3d4b6b0b15c6a78397a704194bcd5037d8382c1d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 28 Dec 2020 21:37:48 -0500 Subject: [PATCH 3/3] Update changelog. --- changelog.d/2525.patch.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2525.patch.rst diff --git a/changelog.d/2525.patch.rst b/changelog.d/2525.patch.rst new file mode 100644 index 0000000000..8b590dce27 --- /dev/null +++ b/changelog.d/2525.patch.rst @@ -0,0 +1 @@ +Avoid hitting network during test_virtualenv.test_test_command.