-
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
Ignore errors in temporary directory cleanup #11394
Conversation
2a6b557
to
1e903c2
Compare
I wonder how viable it’d be to aggregate these removal failures and show just one warning message before the process exits instead. This can be quite spammy if a package contains a lot of files cannot be removed. |
Is this even viable ? As @uranusjr said, it would be a mess when installing packages containing many files, and would spam the console. Perhaps leave this as an option ? |
I have changed it so only a single warning is displayed for a temporary directory.
This is still done when
|
bcc43f7
to
149fbda
Compare
Hi. Is there anything blocking this PR being merged? This will fix a problem we are hitting regularly. Many thanks |
149fbda
to
4d8d63c
Compare
pip should not exit with an error when it fails to cleanup temporary files after it has already successfully installed packages.
Preserve existing mode flags, handle case where we even lack permission to change the mode.
Log individual errors at debug logging level.
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
4d8d63c
to
2928750
Compare
Blocked by <pypa/pip#11394>.
Pip frequently fails on windows with a PermissionError in temporary directory cleanup after it has already successfully installed upgraded/uninstalled a package.
E.g if you have
import matplotlib
in one python session and runin another, you get
(note the '\\~4tplotlib\\' name) indicating this is failure to remove an temp backup; a new package is already fully installed at this point)
With this applied
This also fixes #6327 (similar problem on nfs)