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

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

merged 3 commits into from Jun 15, 2020

Conversation

ghost
Copy link

@ghost ghost commented Apr 30, 2020

ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python. The internal PIP
installation routine by default temporarily uses its cache, if it
exists. This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.

https://bugs.python.org/issue40448

ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@kkonopko

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@ned-deily
Copy link
Member

@pradyunsg Opinions?

@ghost
Copy link
Author

ghost commented May 20, 2020

Is there still I need to do about this PR? No pressure, just checking :)

Should I do anything about bedevere/news, or is it something that a maintainer would take care of when merging?

@ned-deily
Copy link
Member

I've also just asked on the bug tracker for a review.

Copy link
Member

@pfmoore pfmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, and I agree this change makes sense.

@pfmoore
Copy link
Member

pfmoore commented May 20, 2020

Is there still I need to do about this PR?

I believe you'll need to fix the test failures and add a news item.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too!

@ned-deily
Copy link
Member

@kkonopko If you would like to add a news entry, please do so. You can use the blurb-it web interface or the blurb program (see here). The changelog has plenty of examples.

@ned-deily ned-deily merged commit 4a3a682 into python:master Jun 15, 2020
@miss-islington
Copy link
Contributor

Thanks @kkonopko for the PR, and @ned-deily for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8, 3.9.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-20893 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 15, 2020
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
(cherry picked from commit 4a3a682)

Co-authored-by: Krzysztof Konopko <[email protected]>
@bedevere-bot
Copy link

GH-20894 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 15, 2020
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
(cherry picked from commit 4a3a682)

Co-authored-by: Krzysztof Konopko <[email protected]>
@bedevere-bot
Copy link

GH-20895 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 15, 2020
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
(cherry picked from commit 4a3a682)

Co-authored-by: Krzysztof Konopko <[email protected]>
miss-islington added a commit that referenced this pull request Jun 15, 2020
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
(cherry picked from commit 4a3a682)

Co-authored-by: Krzysztof Konopko <[email protected]>
miss-islington added a commit that referenced this pull request Jun 15, 2020
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
(cherry picked from commit 4a3a682)

Co-authored-by: Krzysztof Konopko <[email protected]>
miss-islington added a commit that referenced this pull request Jun 15, 2020
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
(cherry picked from commit 4a3a682)

Co-authored-by: Krzysztof Konopko <[email protected]>
arun-mani-j pushed a commit to arun-mani-j/cpython that referenced this pull request Jul 21, 2020
ensurepip optionally installs or upgrades 'pip' and 'setuptools' using
the version of those modules bundled with Python.  The internal PIP
installation routine by default temporarily uses its cache, if it
exists.  This is undesirable as Python builds and installations may be
independent of the user running the build, whilst PIP cache location
is dependent on the user's environment and outside of the build
environment.

At the same time, there's no value in using the cache while installing
bundled modules.

This change disables PIP caching when used in ensurepip.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants