Skip to content
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

Add a command for managing pip's cache #4685

Closed
pradyunsg opened this issue Aug 21, 2017 · 22 comments
Closed

Add a command for managing pip's cache #4685

pradyunsg opened this issue Aug 21, 2017 · 22 comments
Labels
C: cache Dealing with cache and files in it C: cli Command line interface related things (optparse, option grouping etc) state: needs discussion This needs some more discussion type: feature request Request for a new feature

Comments

@pradyunsg
Copy link
Member

pradyunsg commented Aug 21, 2017

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.

@pradyunsg pradyunsg added state: needs discussion This needs some more discussion type: enhancement Improvements to functionality C: cache Dealing with cache and files in it labels Aug 21, 2017
@pradyunsg pradyunsg added this to the Improve our User Experience milestone Aug 21, 2017
@pradyunsg pradyunsg added type: feature request Request for a new feature and removed type: enhancement Improvements to functionality labels Oct 24, 2017
@Jamim

This comment has been minimized.

@pradyunsg

This comment has been minimized.

@jayvdb

This comment has been minimized.

@pradyunsg

This comment has been minimized.

@pradyunsg pradyunsg added the C: cli Command line interface related things (optparse, option grouping etc) label Jan 3, 2019
@ffranr
Copy link

ffranr commented Jan 4, 2019

@pradyunsg Is there currently a single PR that addresses this issue? What is the latest WIP on this issue?

@pradyunsg
Copy link
Member Author

@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. :)

@pradyunsg
Copy link
Member Author

FWIW, I'm open guiding someone with this, if they are willing to work on it.

@danizen
Copy link

danizen commented Feb 18, 2019

@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).

@duckinator
Copy link
Contributor

Is anyone currently working on this?

If not, I'd be happy to work on it.

As best I can gather from poking around:

@pradyunsg ^does that all seem correct, to you? And is there anything else I'd need to be aware of?

@pradyunsg
Copy link
Member Author

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
Copy link
Member Author

pradyunsg commented Mar 20, 2019

@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.

@pradyunsg
Copy link
Member Author

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.

@duckinator
Copy link
Contributor

FYI, I'm planning to work on this next week. Will leave a message here or in #pypa-dev if I get stuck. 🙂

@duckinator duckinator mentioned this issue Apr 8, 2019
10 tasks
@duckinator
Copy link
Contributor

duckinator commented Apr 8, 2019

I have a still-in-progress PR for this over at #6391.

@rugglcon
Copy link

rugglcon commented Mar 3, 2020

Any progress on this? Been almost a year.

@duckinator
Copy link
Contributor

duckinator commented Mar 4, 2020

@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. 🙂

@danizen
Copy link

danizen commented Mar 6, 2020

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.

@ashwinvis
Copy link

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.

@pradyunsg
Copy link
Member Author

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. :)

@danizen
Copy link

danizen commented Apr 19, 2020

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.

@duckinator
Copy link
Contributor

@pradyunsg I think this can be closed now, yeah?~ :3

@pradyunsg
Copy link
Member Author

Yeas!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: cache Dealing with cache and files in it C: cli Command line interface related things (optparse, option grouping etc) state: needs discussion This needs some more discussion type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

8 participants