-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Pip endlessly downloads all previous versions of python packages #12827
Comments
As a note those are just the python versions I tried it on. Also as a note, when hitting PyPI it downloads a .whl.metadata file, but when I hit other mirrors like CodeArtifact it downloads the entire wheel. |
As you've noted the reason @jeanas closed #11928 is because now pip should download the metadata of the packages, and not the whole package.
It is up to CodeArtifacts to implement the metadata file support on their end, once they do, pip will use it. I'm not familiar with this service, but perhaps raise an issue with them? But yes, while this improves IO it doesn't stop pip from getting into this situation in the first place, of having to backtrack many versions of a package. The situation should be significantly improved once pip prefers direct causes (which I have a draft PR here #12499, but there is a lot of work still do before being able to land it). |
Thank you for the information. CodeArtifact is AWS's artifact store: https://aws.amazon.com/codeartifact/ |
Btw, it would be remiss of me to mention that uv tends to handle resolution better than pip does and provides a pip like interface ( Even if you can't use uv directly in your workflow, you may find it's
You may want to use those versions of awscli, s3fs, boto3, as your lower bounds, you may also find specifying a urllib3 requirement quite helpful as well, e.g. Also, if you need to support a wide range of awscli, s3fs, and boto3, uv also comes with a flag |
Great call out. I'm actually a fan of uv and use it for personal projects. I actually have another issue in that repo to get better support for codeartifact and other indexes. astral-sh/uv#1404 |
Description
I'm seeing this behavior again in the latest pip version. #11928
Expected behavior
Recent versions of pip should avoid downloading a whole package just to get its metadata, see PEP 658.
pip version
24.1.1
Python version
Python 3.8, 3.9, 3.10, 3.11
OS
Linux
How to Reproduce
pip install awscli s3fs boto3
Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: