[issue2810] _winreg.EnumValue sometimes raises WindowsError ("More data is available")

Brian Curtin report at bugs.python.org
Wed Apr 28 05:29:33 CEST 2010


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

test_changing_value is giving inconsistent results when the _winreg.c patch is not applied. It mostly fails on QueryValue, sometimes on EnumValue, and about 1/10 times the test does not fail at all. Ideally the tests should not use threads -- can the same thing be tested without a thread? It seems like the issue isn't related to concurrency, but maybe I missed something.

With _winreg.c patched, the tests seem to pass, but I haven't run that as much as I have the unpatched version.

winreg_test.pach
- test_changing_value (assuming we need do this as a thread)
-- I'd just use HKEY_CURRENT_USER directly instead of storing it locally
-- done doesn't need to be a list, it could just be the True/False
-- the if/else could be shortened to `s = "x" if short else "x"*2000`

- test_long_key
-- After SetValue I'd just call EnumKey(key, 0) since you can only ever have that value to use. The loop isn't really used.

----------

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


More information about the Python-bugs-list mailing list