pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.47k stars 3.01k forks source link

Dry-run "find" or equivalent option to list wheels and other files that will be downloaded #12749

Open schivmeister opened 3 months ago

schivmeister commented 3 months ago

The following issue was probably mistakenly closed due to a probable misunderstanding:

https://github.com/pypa/pip/issues/6430

The justification for that is that the original author had left this comment which indicates the works cited until that point were not in the direction the author had in mind:

Neither pip index version now and #10052 covers what I originally needed. I was looking for the information “what file will be downloaded when I install this requirement”. Both features you linked only operate at the version level, but I need the information at the file level. Numpy 1.16.3, for example, contains 22 wheels and 1 sdist, I want to know which one will be selected.

Originally posted by @uranusjr in https://github.com/pypa/pip/issues/6430#issuecomment-926140949

The existing --dry-run --report flags download the files instead of reporting what would be downloaded. Therefore, the feature request still stands (regardless of whether the original author agrees).

For details of this feature request, please refer to the cited issue above or re-open that issue.

P.S: Since Pip folks don't seem to care for multithreaded downloads (another one closed mistakenly due to misunderstanding, i.e. parallel downloads are not parallel connections), and you won't be supporting external download accelerators, I could at least use a feature like this to get a list of files to download with my chosen tool, so I can max out my 50Mbps and not be stuck to the single-threaded 5Mbps speed limits enforced by the incompetent ISPs in my location. Thank you for understanding!

notatallshaw commented 3 months ago

Would it be sufficient for dry run not to download the files? https://github.com/pypa/pip/issues/12603

Or do you explicitly want pip to determine what will need to be downloaded as well as what will be installed? (Like what conda does).

Also, regarding your p.s, there is a PR that has made good progress to add parallel downloads https://github.com/pypa/pip/pull/12388

schivmeister commented 3 months ago

Would it be sufficient for dry run not to download the files? #12603

Or do you explicitly want pip to determine what will need to be downloaded as well as what will be installed? (Like what conda does).

Also, regarding your p.s, there is a PR that has made good progress to add parallel downloads #12388

Thanks for noticing! A dry-run option like https://github.com/pypa/pip/issues/12603 to not download full wheels is indeed a very welcome feature, but it wouldn't output a simple list -- it would output a report that needs further processing. Of course, anyone is free to dismiss this distinction.

Regarding my postscript on multithreaded downloads, unfortunately -- unless I misunderstood the corresponding details and discussion -- https://github.com/pypa/pip/pull/12388 is still about parallel file downloads, not parallel connections per download, like what one could achieve with something like https://pypi.org/project/python-axel/.