-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Make winreg import compatible to modern Python #7500
Conversation
A bugfix newsfile is needed and ideally a test also :) |
I am without a computer so the news is the best I can do now :( |
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.
This is pretty much verbatim what is in the upstream version (except PY2 vs PY3), and we're trying to get rid of the bundled version anyway, so I'm personally OK with no tests in this case.
I thought about it a bit but am not sure how to meaningfully test this :/ |
Simply calling |
Is there a way to make |
monkeypatch.setattr( | ||
appdirs, | ||
"_get_win_folder_from_registry", | ||
_get_win_folder_from_registry, |
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.
I was actually hoping that winreg.OpenKey
and winreg.QueryValueEx
could be called for real on Windows. Is there a blocker ?
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.
Not blocker but I don’t think it’s meaningful. Their return values might not be predictable (being essentially system configuration).
Closing since #7501 is now in a mergeable state |
Fix #7495.
I intend to work on #6040 to eliminate the internal copy next, but figured it’s better to post this quick fix first.