summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2015-06-02 14:54:37 (GMT)
committerDonald Stufft <donald@stufft.io>2015-06-02 14:54:37 (GMT)
commit69c0d26159167fe76b239b5715c4ffd73a804de1 (patch)
tree7f138748c0f00d89753592a32b3a0a2315799f84 /Lib
parent43a98df1475a25c486abb64771c85afb563bf560 (diff)
downloadcpython-69c0d26159167fe76b239b5715c4ffd73a804de1.zip
cpython-69c0d26159167fe76b239b5715c4ffd73a804de1.tar.gz
cpython-69c0d26159167fe76b239b5715c4ffd73a804de1.tar.bz2
Issue #24267 - Ensure that pip version check is disabled on uninstall
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ensurepip/__init__.py2
-rw-r--r--Lib/test/test_ensurepip.py25
2 files changed, 21 insertions, 6 deletions
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
index 4244299..0843b54 100644
--- a/Lib/ensurepip/__init__.py
+++ b/Lib/ensurepip/__init__.py
@@ -147,7 +147,7 @@ def _uninstall_helper(verbosity=0):
_disable_pip_configuration_settings()
# Construct the arguments to be passed to the pip command
- args = ["uninstall", "-y"]
+ args = ["uninstall", "-y", "--disable-pip-version-check"]
if verbosity:
args += ["-" + "v" * verbosity]
diff --git a/Lib/test/test_ensurepip.py b/Lib/test/test_ensurepip.py
index f671ee3..8645f05 100644
--- a/Lib/test/test_ensurepip.py
+++ b/Lib/test/test_ensurepip.py
@@ -216,7 +216,10 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
ensurepip._uninstall_helper()
self.run_pip.assert_called_once_with(
- ["uninstall", "-y", "pip", "setuptools"]
+ [
+ "uninstall", "-y", "--disable-pip-version-check", "pip",
+ "setuptools",
+ ]
)
@requires_usable_pip
@@ -225,7 +228,10 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
ensurepip._uninstall_helper(verbosity=1)
self.run_pip.assert_called_once_with(
- ["uninstall", "-y", "-v", "pip", "setuptools"]
+ [
+ "uninstall", "-y", "--disable-pip-version-check", "-v", "pip",
+ "setuptools",
+ ]
)
@requires_usable_pip
@@ -234,7 +240,10 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
ensurepip._uninstall_helper(verbosity=2)
self.run_pip.assert_called_once_with(
- ["uninstall", "-y", "-vv", "pip", "setuptools"]
+ [
+ "uninstall", "-y", "--disable-pip-version-check", "-vv", "pip",
+ "setuptools",
+ ]
)
@requires_usable_pip
@@ -243,7 +252,10 @@ class TestUninstall(EnsurepipMixin, unittest.TestCase):
ensurepip._uninstall_helper(verbosity=3)
self.run_pip.assert_called_once_with(
- ["uninstall", "-y", "-vvv", "pip", "setuptools"]
+ [
+ "uninstall", "-y", "--disable-pip-version-check", "-vvv",
+ "pip", "setuptools",
+ ]
)
@requires_usable_pip
@@ -344,7 +356,10 @@ class TestUninstallationMainFunction(EnsurepipMixin, unittest.TestCase):
ensurepip._uninstall._main([])
self.run_pip.assert_called_once_with(
- ["uninstall", "-y", "pip", "setuptools"]
+ [
+ "uninstall", "-y", "--disable-pip-version-check", "pip",
+ "setuptools",
+ ]
)