Skip to content

gh-95299: Stop installing setuptools as a part of ensurepip and venv#101039

Merged
pradyunsg merged 21 commits intopython:mainfrom
pradyunsg:remove-setuptools-ensurepip
Apr 18, 2023
Merged

gh-95299: Stop installing setuptools as a part of ensurepip and venv#101039
pradyunsg merged 21 commits intopython:mainfrom
pradyunsg:remove-setuptools-ensurepip

Conversation

@pradyunsg
Copy link
Copy Markdown
Member

@pradyunsg pradyunsg commented Jan 14, 2023

This PR removes the bundled setuptools wheel from ensurepip, and stops installing setuptools in environments created by venv.


I based this PR off of my understanding of venv and ensurepip, and using the following search to locate all the relevant bits of code + ensuring that tests are happy locally.

Screenshot 2023-01-14 at 17 20 01

In this PR, I've intentionally not touched the example in https://docs.python.org/3.12/library/venv.html#an-example-of-extending-envbuilder. That example is largely outdated and is likely better served being updated in a dedicated PR for it.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.12 only security fixes stdlib Standard Library Python modules in the Lib/ directory topic-ensurepip

Projects

None yet

Development

Successfully merging this pull request may close these issues.