-
-
Notifications
You must be signed in to change notification settings - Fork 31.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
Add {Create|Delete}KeyEx to _winreg, doc and test updates #51596
Comments
The _winreg module could use the addition of the RegCreateKeyEx call, as The patch includes the change to _winreg.c, along with doc and test |
Updated patch - c&p mistake in a comment |
After looking at this more, I poked around and found a whole lot of Changes:
So far everything passes on XP 32-bit, Server 2003 32-bit, and Server There is an added file, delete_regkey.vbs, because 32-bit applications |
After looking into this again, the testing situations are much different than I had originally written. Some of the tests aren't really valid exercises. For one, the querying/enabling/disabling of reflection keys aren't good tests as they aren't tested against reflected keys. Windows 7 and Server 2008 R2 act differently in reflection situations when compared to XP/Vista/Server 2003, and I'll need to account for that. For now, forget about the current patches, I'm working on a more correct testing approach. |
This needs bpo-7860 for properly figuring out the machine architecture for some 32-bit Python on 64-bit Windows tests. |
Attached is what I believe is the complete patch. You'll need to apply the patch on bpo-7860 for proper test coverage of a 32-bit Python running on 64-bit Windows. Here's a summary of what's contained:
Overall the theme is to better our support of 64-bit Windows. The testing scenario becomes a bit more involved given the spread of Windows versions supported and their varying level of support of some of the APIs being exposed. I think the tests are documented well enough to explain what scenarios are available and which are being tested, but let me know if more detail is needed. I've tested this on the following machines with success:
|
I've uploaded the patch to http://codereview.appspot.com/223088 |
Fixed a few a/an word changes and a few tab/space issues. Re-uploaded to Rietveld at http://codereview.appspot.com/580041 |
Why the *Ex names? Can't we just add additional arguments to the original names? The Python names do not necesarily have to match the API calls. Having QueryValue and QueryValueEx was a mistake in the first place, and I would prefer not continuing doing such things. |
RegDeleteKeyEx will only work on a Windows version of 5.2 or greater (Vista/XP x64), and XP is 5.1, so RegDeleteKeyEx can't be a simple drop-in under the "DeleteKey" name. CreateKeyEx is different though since it goes as far back as Win2k, and it could be put into CreateKey like you suggest. However, given the way the rest of the module is laid out with *Key and *KeyEx already, it seemed more consistent the way I had written it. I could change this if more people agree with your plan. |
Gabriel, besides the *Ex naming, do you see anything wrong with the rest of the patch? I'd like to try and get this into 2.7 before the upcoming beta. |
Committed to trunk in r79620. I'll do the forward port after 2.7b1. |
Ported to py3k in r80329. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: