[issue7347] Add {Create|Delete}KeyEx to _winreg, doc and test updates

Brian Curtin report at bugs.python.org
Fri Nov 20 22:07:48 CET 2009


Brian Curtin <curtin at acm.org> added the comment:

After looking at this more, I poked around and found a whole lot of
things either missing or broken with _winreg.

Changes:
- documentation missing for *ReflectionKey, and updated a few
incorrectly documented exceptions in the docstrings
- QueryReflectionKey always returned False if the underlying API call
succeeded (used return code from call instead of bool param)
- addition of RegCreateKeyEx and RegDeleteKeyEx for 64-bit support
- changed the test suite to cover much more of the _winreg API. There
are now classes for local, remote, and 64-bit specific tests, with some
tests in the 64-bit class which are specific to whether Python was
compiled for 32 or 64-bit due to the differences in how _winreg acts.


So far everything passes on XP 32-bit, Server 2003 32-bit, and Server
2003 64-bit with a 32-bit Python. On Server 2003 64-bit with a 64-bit
Python, I get one failure on test_create_open_delete_for_32bit about
DeleteKeyEx -- not sure what the deal is, but I'm looking into it.

There is an added file, delete_regkey.vbs, because 32-bit applications
can create keys in the 64-bit space, but apparently they cannot be
deleted with DeleteKey -- they'd need DeleteKeyEx but that's 64-bit
only. It's used as a cleanup to make sure the key gets deleted in one case.

----------
title: Patch - add RegCreateKeyEx to _winreg -> Add {Create|Delete}KeyEx to _winreg, doc and test updates
Added file: http://bugs.python.org/file15370/winreg_add_createkeyex_v2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7347>
_______________________________________


More information about the Python-bugs-list mailing list