-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Have pip cache purge
and pip cache remove
handle empty directories.
#9058
base: main
Are you sure you want to change the base?
Conversation
Heads up: The MacOS workers on Azure Pipelines are failing right now -- #9030. |
Thanks for the heads up. I also just discovered that |
You could wait for a couple of weeks, and we'll drop Python 2 support from |
Making it work without using Do y'all support Python 3 versions before 3.5? If you don't then, screw it, I'll just wait for you to drop Python 2 support lmao |
Nope. Python 3.5 and Python 2 get dropped after 20.3. :) |
Okay, in that case let's leave this for after Py2 is dropped. 👍 |
b30e590
to
226d1c2
Compare
Rebased off of master (ab7ff0a). (It seems Py2 is still in the list of tests; just wanted to keep the PR from getting stale.) |
226d1c2
to
94d1069
Compare
Rebased off master (d108e49). I'm not sure what the reason for the failing CI tasks is. I do see this error in the failed tasks, however:
|
As a note, anything requiring more than rebasing this PR will probably have to wait a month or two at least. Pretty busy with trying to get a house and such. 😅 |
This seems to be the specific error:
|
94d1069
to
cc0a462
Compare
ah, thank you @uranusjr. Had trouble finding that in the CI output. 😅 I fixed that problem (or at least, that's what
Not sure what's up with that. |
@duckinator the flake8 error seems to be still present. |
cc0a462
to
784d293
Compare
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
Hiya @duckinator -- would you be interested in updating this PR? :) |
@pradyunsg I'll rebase this sometime in the next few days. If it's not done by Wednesday (September 22nd) feel free to ping me here again. 👍 |
Running a bit behind on things this week, but still hoping to get to it in the next few days. Sorry for the delay! |
No worries and thanks for the update! Please don’t feel pressured to update this ASAP. :) I’m gonna put this into the release milestone to remind myself to keep an eye out for updates here — it’s totally fine if this gets pushed down the road. |
784d293
to
1cbcc61
Compare
c75cae3
to
11db9a5
Compare
Rebased, and simplified(!) because some of the changes in the last ~year let me simplify my code. ^.^ |
Gentle ping |
@uranusjr hey, thanks for the nudge. Got a bit overwhelmed with other things, and this fell through the cracks. |
Rebased off main (as of c394bf6). Currently working on adding types to everything I added. |
Added type information to all the functions I added in EDIT: I missed the return types, whoops. |
e600b8b
to
b8a5a79
Compare
d5b9ca0
to
f417270
Compare
EDIT: I thought @uranusjr's changes would work verbatim and just went for it because this system has no Python dev environment. CI has informed me I was wrong. Undoing that for now. 😅 Still need to add tests for |
To implement #5037, I am going to add some metadata files in the wheel cache entries directories. So instead of checking for empty directories, we may want to check for directories with no |
@sbidoul thanks for the heads-up. I added an updated TODO in the first comment (so it's not buried), which includes accounting for that. 👍 |
This comment was marked as outdated.
This comment was marked as outdated.
Rebased off main (81f6a9f). |
Need to update tests to match the new output. |
Since 22.2 introduced
|
Rebased off main (3682309) and updated tests to match the new output format. |
… wheels caches; make `pip cache remove` prune empty directories.
Rebased off main (e98cc5c). |
Can you add a news entry please: https://pip.pypa.io/en/latest/development/contributing/#news-entries |
EDIT (May 6 2022): Editing to add an updated todo list.
TODO:
.whl
files, instead of empty directories — see the comment by @sbidoul belowsubdirs_with_no_files(path)
or whatever this gets changed to).These are the changes discussed in #7372:
pip cache remove
prune empty directories.pip cache purge
delete everything in the http and wheels caches (not just files).pip cache purge
removeselfchecks.json
.This PR does not account for having
pip cache purge
remove things in thepip/selfchecks/
directory when appropriate, which was also discussed in #7372.