-
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
Effectively disable the wheel cache if not writable #7489
Conversation
Windows CI isn't happy - possibly since the test/code isn't working there as expected. |
OTOH, doing it in |
Yes, apparently |
75c8f43
to
9c5ecc2
Compare
9c5ecc2
to
edcc521
Compare
I squashed the history a little bit. |
Regarding the test on Windows, we have a test helper |
ad825f7
to
edcc521
Compare
According to this comment pip/tests/unit/test_networking_cache.py Lines 19 to 21 in d613433
it looks like check_path_owner does not work on Windows so it would mean this whole mechanism to check for cache ownership has no effect on windows?
|
I think this one is good to go, because the cache permission check was never implemented on Windows, so it's ok to have the new test disabled on Windows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment.
In a followup it may be good to separate and rename check_path_owner
to actually only check whether the path is owned by the current user, and then we could use test_writable_dir
to check whether it is writable like if not owned_by_current_user(...) or not is_writable_dir(...)
.
This avoid code duplication (for the wheel and http cache) and repeated warnings.
353377e
to
1ee270a
Compare
Merging since there's multiple approving reviews. :) |
Move the test for cache writeability from the
install
command to theWheelCache
object.The test was ineffective in the install command because it was done after creating the wheel cache object. The test was also missing in the
wheel
andfreeze
commands.The test is in
WheelCache
and notCache
to avoid a double warning viaCache
andSimpleWheelCache
.I also considered putting the check in the option parser, but at that point the logger is not fully initialized and warning was not colored.
Fixes #7488