pip's cache is currently a black box that the users can't really inspect. This is not the nicest of experiences. Adding a pip cache to allow interacting with the cache (much like the new pip config
) would be a good way to fix that.
Here's a proposal for the same:
$ pip cache --help
Usage:
pip cache info
pip cache list [name]
pip cache purge [name/pattern]
Description:
Manage what packages are available in pip's caches.
PS: This is the same idea as pip cache
as expressed in #3968 and #3734. I'm just creating a tracking issue for it since both the PR authors seem to have lost interest and having an open issue for tracking a new feature seems cleaner to me.
Hi there,
Does anyone work on this?
No one yet, AFAIK.
Well, there was https://github.com/pypa/pip/pull/3968 , but for some reason it was abandoned.
That's mentioned in the first post @jayvdb. :)
@pradyunsg Is there currently a single PR that addresses this issue? What is the latest WIP on this issue?
@pradyunsg Is there currently a single PR that addresses this issue? What is the latest WIP on this issue?
No, there isn't. If any work happens, this issue would have updates on it.
BTW, if someone is willing to contribute to pip, this would be a great place to do so. :)
FWIW, I'm open guiding someone with this, if they are willing to work on it.
@pradyunsg, what documents should a new dev read on pip 10+ internals? How does CI work, assuming there's no CD (pip does seem to version quickly, but... it is an open source project).
Is anyone currently working on this?
If not, I'd be happy to work on it.
As best I can gather from poking around:
src/pip/_internal/commands/__init__.py
and added to the commands_order
list.tests/functional/
with the filename test_<command>.py
. (With slight variation as needed.)@pradyunsg ^does that all seem correct, to you? And is there anything else I'd need to be aware of?
what documents should a new dev read on pip 10+ internals?
There is none yet. pip's internals were never documented. I do want to write an "overview" to add to the development documentation of pip, but haven't been able to take out time for it.
@pradyunsg ^does that all seem correct, to you? And is there anything else I'd need to be aware of?
Yes. It is correct.
I think you'll also need to know what the structure of the cache is and how CacheControl manages things to be able to write a cache command. The existing PRs should serve as a useful reference.
I'd be happy to work on it.
You are welcome to. :)
Feel free to ping me for questions; pip developers hang out on #pypa-dev on Freenode, if you wanna have a chat.
FYI, I'm planning to work on this next week. Will leave a message here or in #pypa-dev if I get stuck. :slightly_smiling_face:
I have a still-in-progress PR for this over at #6391.
Any progress on this? Been almost a year.
@rugglcon yeah, it's being actively worked on. Progress has been a bit slow (largely due to a combination of my health issues + short attention span), but it's getting there. You can check out PR #6391 if you're interested in the details. :slightly_smiling_face:
It is not that hard to just delete it, once you find it, right? Perhaps simply a command that prints out the cache location would be a small, productive step.
Not exactly what is needed, but I have a script that deletes any files in ~./cache/pip older than 120 days and leaves the rest intact.
This has been added in #6391 (yay @duckinator)! It will be a part of pip 20.1's beta release, which is due tomorrow.
We'd appreciate any amount of user testing that the community could do to provide feedback on this new command! This issue is kept open for minor discussions and positive feedback (we're humans!), and I encourage users to file new issues to report problems/concerns/issue with the new command. :)
We'd appreciate any amount of user testing that the community could do to provide feedback on this new command!
I'll tell my developers (I am not a manager, I'm the techiest techie) tomorrow.
@pradyunsg I think this can be closed now, yeah?~ :3
Yeas!
Most helpful comment
This has been added in #6391 (yay @duckinator)! It will be a part of pip 20.1's beta release, which is due tomorrow.
We'd appreciate any amount of user testing that the community could do to provide feedback on this new command! This issue is kept open for minor discussions and positive feedback (we're humans!), and I encourage users to file new issues to report problems/concerns/issue with the new command. :)