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

Fixes #3055 Uninstall causes paths to exceed MAX_PATH limit #6029

Merged
merged 9 commits into from
Dec 6, 2018

Conversation

zooba
Copy link
Contributor

@zooba zooba commented Nov 21, 2018

Fixes #3055 Uninstall causes paths to exceed MAX_PATH limit
Moves files to adjacent directory to avoid creating a deeper path when uninstalling.

@zooba
Copy link
Contributor Author

zooba commented Nov 21, 2018

(Obviously this is not ready to merge yet.)

@zooba
Copy link
Contributor Author

zooba commented Nov 26, 2018

@pradyunsg @dstufft @pfmoore I think this is ready.

I split out the install stage changes to #6030 because I have a question about the direction to take that.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

self.path = os.path.realpath(path)
break

if not self.path:
Copy link
Member

@pradyunsg pradyunsg Dec 2, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a for-else; though I'm not sure if that's best for readability.

for candidate in ...:
    try:
        ...
    except:
        ...
    else:
        ...
        break
else:
    self.path = os.path.realpath(...)

@pradyunsg pradyunsg added type: enhancement Improvements to functionality OS: windows Windows specific C: uninstall The logic for uninstallation of packages labels Dec 2, 2018
@zooba
Copy link
Contributor Author

zooba commented Dec 3, 2018

Waiting on @dstufft to hit merge?

@pradyunsg
Copy link
Member

I don't usually merge PRs when I am not super active in the original discussion.

There's always a chance that I misunderstand the discussion - obviously, I want to avoid acting based on that. ;)

@pradyunsg
Copy link
Member

So, yes. Or @pfmoore.

@pfmoore pfmoore merged commit c5dc6aa into pypa:master Dec 6, 2018
@zooba zooba deleted the issue-3055 branch December 7, 2018 00:08
@zooba
Copy link
Contributor Author

zooba commented Dec 7, 2018

Thanks, Paul!

@lock
Copy link

lock bot commented May 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 31, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: uninstall The logic for uninstallation of packages OS: windows Windows specific type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrading pip fails on Windows when install path is too long
4 participants