Skip to content
Closed
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
6 changes: 6 additions & 0 deletions Doc/whatsnew/3.7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ README.rst is now included in the list of distutils standard READMEs and
therefore included in source distributions.
(Contributed by Ryan Gonzalez in :issue:`11913`.)

ensurepip
---------

The ``wheel`` package will now be installed by :mod:`ensurepip`. Enabling pip's
wheel cache by default.

http.server
-----------

Expand Down
3 changes: 3 additions & 0 deletions Lib/ensurepip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@

_PIP_VERSION = "9.0.1"

_WHEEL_VERSION = "0.30.0"

_PROJECTS = [
("setuptools", _SETUPTOOLS_VERSION),
("pip", _PIP_VERSION),
("wheel", _WHEEL_VERSION),
]


Expand Down
Binary file not shown.
38 changes: 19 additions & 19 deletions Lib/test/test_ensurepip.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ def test_basic_bootstrapping(self):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
unittest.mock.ANY, "setuptools", "pip",
unittest.mock.ANY, "setuptools", "pip", "wheel",
],
unittest.mock.ANY,
)

additional_paths = self.run_pip.call_args[0][1]
self.assertEqual(len(additional_paths), 2)
self.assertEqual(len(additional_paths), 3)

def test_bootstrapping_with_root(self):
ensurepip.bootstrap(root="/foo/bar/")
Expand All @@ -56,7 +56,7 @@ def test_bootstrapping_with_root(self):
[
"install", "--no-index", "--find-links",
unittest.mock.ANY, "--root", "/foo/bar/",
"setuptools", "pip",
"setuptools", "pip", "wheel",
],
unittest.mock.ANY,
)
Expand All @@ -67,7 +67,7 @@ def test_bootstrapping_with_user(self):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
unittest.mock.ANY, "--user", "setuptools", "pip",
unittest.mock.ANY, "--user", "setuptools", "pip", "wheel",
],
unittest.mock.ANY,
)
Expand All @@ -78,7 +78,7 @@ def test_bootstrapping_with_upgrade(self):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
unittest.mock.ANY, "--upgrade", "setuptools", "pip",
unittest.mock.ANY, "--upgrade", "setuptools", "pip", "wheel",
],
unittest.mock.ANY,
)
Expand All @@ -89,7 +89,7 @@ def test_bootstrapping_with_verbosity_1(self):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
unittest.mock.ANY, "-v", "setuptools", "pip",
unittest.mock.ANY, "-v", "setuptools", "pip", "wheel",
],
unittest.mock.ANY,
)
Expand All @@ -100,7 +100,7 @@ def test_bootstrapping_with_verbosity_2(self):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
unittest.mock.ANY, "-vv", "setuptools", "pip",
unittest.mock.ANY, "-vv", "setuptools", "pip", "wheel",
],
unittest.mock.ANY,
)
Expand All @@ -111,7 +111,7 @@ def test_bootstrapping_with_verbosity_3(self):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
unittest.mock.ANY, "-vvv", "setuptools", "pip",
unittest.mock.ANY, "-vvv", "setuptools", "pip", "wheel",
],
unittest.mock.ANY,
)
Expand Down Expand Up @@ -187,8 +187,8 @@ def test_uninstall(self):

self.run_pip.assert_called_once_with(
[
"uninstall", "-y", "--disable-pip-version-check", "pip",
"setuptools",
"uninstall", "-y", "--disable-pip-version-check","wheel",
"pip", "setuptools",
]
)

Expand All @@ -198,8 +198,8 @@ def test_uninstall_with_verbosity_1(self):

self.run_pip.assert_called_once_with(
[
"uninstall", "-y", "--disable-pip-version-check", "-v", "pip",
"setuptools",
"uninstall", "-y", "--disable-pip-version-check", "-v", "wheel",
"pip", "setuptools",
]
)

Expand All @@ -209,8 +209,8 @@ def test_uninstall_with_verbosity_2(self):

self.run_pip.assert_called_once_with(
[
"uninstall", "-y", "--disable-pip-version-check", "-vv", "pip",
"setuptools",
"uninstall", "-y", "--disable-pip-version-check", "-vv", "wheel",
"pip", "setuptools",
]
)

Expand All @@ -221,7 +221,7 @@ def test_uninstall_with_verbosity_3(self):
self.run_pip.assert_called_once_with(
[
"uninstall", "-y", "--disable-pip-version-check", "-vvv",
"pip", "setuptools",
"wheel", "pip", "setuptools",
]
)

Expand Down Expand Up @@ -261,13 +261,13 @@ def test_basic_bootstrapping(self):
self.run_pip.assert_called_once_with(
[
"install", "--no-index", "--find-links",
unittest.mock.ANY, "setuptools", "pip",
unittest.mock.ANY, "setuptools", "pip", "wheel",
],
unittest.mock.ANY,
)

additional_paths = self.run_pip.call_args[0][1]
self.assertEqual(len(additional_paths), 2)
self.assertEqual(len(additional_paths), 3)
self.assertEqual(exit_code, 0)

def test_bootstrapping_error_code(self):
Expand All @@ -292,8 +292,8 @@ def test_basic_uninstall(self):

self.run_pip.assert_called_once_with(
[
"uninstall", "-y", "--disable-pip-version-check", "pip",
"setuptools",
"uninstall", "-y", "--disable-pip-version-check", "wheel",
"pip", "setuptools",
]
)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Install `wheel` in `ensurepip` by default