do not break apart when no common appdata location is set in registry#13567
do not break apart when no common appdata location is set in registry#13567
Conversation
|
I'm afraid that I'm asking you to do more work, but have you investigated whether this would be better fixed in platformdirs instead? This seems like the sort of thing that could be handled with a fallback instead of a registry error. Generally, we prefer to upstream changes to our vendored dependencies over carrying patches (for pip or pip's vendored packages) to keep things maintainable. Thank you! |
|
I've filed an issue with platformdirs to propose a graceful fall back when the registry lookup raises an exception: tox-dev/platformdirs#396. Since, we avoid—by our vendoring policy—making modifications to our vendored dependencies, I will be closing this pull request as we cannot accept it in its current form. If the platformdirs folks do not address the issue, we would be happy to consider a follow up PR to add error handling within pip's code (although I dread that since this really ought to be platformdirs' problem when you think about the API surface). Thank you for your interest in improving pip. Hopefully this still results in an improvement, just in the right place! :) |
When
_pick_get_win_folderinplatformdirs/windows.pyuses registry to find common appdata path andthere is no key in 'HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Common AppData', configuration loading procedure in PIP throws an exception and fails 'install' procedure.
Error example: