Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-40448: ensurepip: Do not use cache #19812

Merged
merged 3 commits into from Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/ensurepip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _bootstrap(*, root=None, upgrade=False, user=False,
additional_paths.append(os.path.join(tmpdir, wheel_name))

# Construct the arguments to be passed to the pip command
args = ["install", "--no-index", "--find-links", tmpdir]
args = ["install", "--no-cache-dir", "--no-index", "--find-links", tmpdir]
if root:
args += ["--root", root]
if upgrade:
Expand Down
16 changes: 8 additions & 8 deletions Lib/test/test_ensurepip.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_basic_bootstrapping(self):

self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
"install", "--no-cache-dir", "--no-index", "--find-links",
unittest.mock.ANY, "setuptools", "pip",
],
unittest.mock.ANY,
Expand All @@ -54,7 +54,7 @@ def test_bootstrapping_with_root(self):

self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
"install", "--no-cache-dir", "--no-index", "--find-links",
unittest.mock.ANY, "--root", "/foo/bar/",
"setuptools", "pip",
],
Expand All @@ -66,7 +66,7 @@ def test_bootstrapping_with_user(self):

self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
"install", "--no-cache-dir", "--no-index", "--find-links",
unittest.mock.ANY, "--user", "setuptools", "pip",
],
unittest.mock.ANY,
Expand All @@ -77,7 +77,7 @@ def test_bootstrapping_with_upgrade(self):

self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
"install", "--no-cache-dir", "--no-index", "--find-links",
unittest.mock.ANY, "--upgrade", "setuptools", "pip",
],
unittest.mock.ANY,
Expand All @@ -88,7 +88,7 @@ def test_bootstrapping_with_verbosity_1(self):

self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
"install", "--no-cache-dir", "--no-index", "--find-links",
unittest.mock.ANY, "-v", "setuptools", "pip",
],
unittest.mock.ANY,
Expand All @@ -99,7 +99,7 @@ def test_bootstrapping_with_verbosity_2(self):

self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
"install", "--no-cache-dir", "--no-index", "--find-links",
unittest.mock.ANY, "-vv", "setuptools", "pip",
],
unittest.mock.ANY,
Expand All @@ -110,7 +110,7 @@ def test_bootstrapping_with_verbosity_3(self):

self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
"install", "--no-cache-dir", "--no-index", "--find-links",
unittest.mock.ANY, "-vvv", "setuptools", "pip",
],
unittest.mock.ANY,
Expand Down Expand Up @@ -260,7 +260,7 @@ def test_basic_bootstrapping(self):

self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
"install", "--no-cache-dir", "--no-index", "--find-links",
unittest.mock.ANY, "setuptools", "pip",
],
unittest.mock.ANY,
Expand Down
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ Vajrasky Kok
Guido Kollerie
Jacek Kołodziej
Jacek Konieczny
Krzysztof Konopko
Arkady Koplyarov
Peter A. Koren
Марк Коренберг
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:mod:`ensurepip` now disables the use of `pip` cache when installing the
bundled versions of `pip` and `setuptools`. Patch by Krzysztof Konopko.