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 install --dry-run
shouln't download full wheels when metadata file available
#12603
Comments
PRs welcome. However, one potential upside of downloading the wheels is that if the dry run is followed by an actual install, the install itself will be faster as everything needed will be cached. So it's not immediately obvious that this change would be beneficial overall. |
I think there are two main use cases for dry run, one where you're validating what would install and then installing, and one where you're collecting the output of dry run as part of a larger environment management process, in this case you may not be installing locally, you could be preparing files for a docker build, or many other things. I think you're thinking of the first case. Even in that case you may decide that the versions are wrong and you want to update the requirements, you may need to do this several times. If the wheels are very large, it's a lot of wasted download and time as you iterate finding the right requirements. |
I've inserted the |
Dry run works fine for me, in the sense that it doesn't install any packages, if you have an issue that appears to be a bug create a new issue with steps to reproduce, including your environment such as your pip version etc. |
@notatallshaw, you're right. I mistakenly assumed that it wasn't, because the output says "Downloading" (which I quickly interrupted). At the end, the output does say "would install" the downloaded package. |
I started working on a PR and I think it's going to be a smaller change once #12300 lands because there's some specific legacy version and specifier warnings which assume the full wheel file is there. So I'm going to wait until that is no longer a concern rather than trying to fix that code. Although this is going to be bigger than a 10 line change, because |
x-ref #12186 |
That PR seems effectively dead, hopefully I can touch this code in a much simpler manner. |
Description
When running
pip install --dry-run {package}
pip downloads the metadata file and then the full wheelExpected behavior
Dry run installs don't need to download the full wheels
pip version
24.0
Python version
3.11
OS
Linux
How to Reproduce
pip install --dry-run kaleido==0.2.1
Output
Code of Conduct
The text was updated successfully, but these errors were encountered: