question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable `cache: 'pip'` for unreleased Python versions

See original GitHub issue

Description:

Disable cache: 'pip' for unreleased Python versions (right now, that means only Python 3.11)

Justification:

The ABI between Python 3.11 versions is not stable, and in fact recently changed between Python 3.11 alpha 2 and alpha 3. This is why projects don’t provide binary wheels for Python 3.11 until the ABI is stabilized. Unfortunately, when enabling pip’s cache, this means that wheels cached for Python 3.11 alpha 2 will get used for Python 3.11 alpha 3 and are then likely to break or segfault. This is not a theoretical concern, this broke urllib3’s test suite, and likely cryptography’s test suite as well. See https://bugs.python.org/issue46320 for more details.

Without this change, our options are disabling pip’s cache altogether or stop testing Python 3.11.

Are you willing to submit a PR?

No, sorry.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
hugovkcommented, Jan 12, 2022

The pip cache can be especially useful for testing dev versions, because there are few wheels available and it can be very slow to build stuff from source. Far better to cache after the first time.

The ABI can change during the CPython alpha and beta phase. It’s also possible during RC, but they aim not to.

So we need to make sure the cache isn’t reused between say 3.11.0a2 and 3.11.0a3.

Onw way would be to include this fully qualified version number in the cache key.

Similar to https://github.com/actions/setup-python/pull/303 which includes x.y but use the full 3.11.0a3 form.

Thoughts?

2reactions
dmitry-shibanovcommented, Feb 7, 2022

Hello everyone. We merged https://github.com/actions/setup-python/pull/303 and released new version of the action with these changes. Now cache will be restored for the particular python versions. For now I’m going to close the issue. If you have any concerns feel free to ping us.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Caching - pip documentation v22.3.1
pip provides an on-by-default caching, designed to reduce the amount of time spent on duplicate downloads and builds.
Read more >
What is pip's `--no-cache-dir` good for? - Stack Overflow
Another reason to disable the pip cache - if you run pip as a user that does not yet exist, their home directory...
Read more >
[Fixed] Pip uses an incorrect cached version of a package
Use the --no-cache-dir option to solve the issue where pip uses an incorrect cached version of a package, e.g. pip install requests==2.28.0 --no-cache-dir...
Read more >
Making pip installs a little less slow - Python⇒Speed
Installing packages with pip, Poetry, and Pipenv can be slow. Learn how to ensure it's not even slower, and a potential speed-up.
Read more >
pip install — pip 10.0.0.dev0 documentation
Pip will read from the subdirectory wheels within the pip cache directory and use any packages found there. This is disabled via the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found