Issue 14420: winreg SetValueEx DWord type incompatible with value argument (original ) (raw ) Issue14420
Created on 2012-03-26 22:22 by RoSanford , last changed 2022-04-11 14:57 by admin . This issue is now closed .
Messages (8)
msg156875 - (view)
Author: Bob (RoSanford)
Date: 2012-03-26 22:22
When calling winreg.SetValueEx(key, value_name, reserved, type, value), the value argument does not support the full range of a 32 bit unsigned integer, which the Window's registry API is expecting. For example, passing a value 0x80000000 will result in the following exception: OverflowError: Python int too large to convert to C long. For consistency with the Window's binding, it should support an unsigned long.
msg156898 - (view)
Author: Tim Golden (tim.golden) *
Date: 2012-03-27 08:18
Brian - I think this is your area
msg156935 - (view)
Author: Bob (RoSanford)
Date: 2012-03-27 15:27
Likewise, the winreg.QueryValueEx method returns a signed 32 bit value, instead of a 32 bit unsigned value.
msg178022 - (view)
Author: Brian Curtin (brian.curtin) *
Date: 2012-12-24 00:14
Here is a patch for the first part (SetValueEx).
msg178302 - (view)
Author: Roundup Robot (python-dev)
Date: 2012-12-27 16:30
New changeset b9752b6c40f8 by Brian Curtin in branch '3.2': Fix #14420 . Use PyLong_AsUnsignedLong to support the full range of DWORD. http://hg.python.org/cpython/rev/b9752b6c40f8
msg178303 - (view)
Author: Brian Curtin (brian.curtin) *
Date: 2012-12-27 16:33
This is fixed on 3.2 through 3.4. On 2.7 we get a ValueError trying to do the same thing so I'll create a separate issue for that since it involves fixing more than just the change in Py2Reg.
msg178306 - (view)
Author: Roundup Robot (python-dev)
Date: 2012-12-27 18:29
New changeset ccbb16719540 by Brian Curtin in branch '2.7': Fix #14420 . Check for PyLong as well as PyInt when converting in Py2Reg. http://hg.python.org/cpython/rev/ccbb16719540
msg178307 - (view)
Author: Brian Curtin (brian.curtin) *
Date: 2012-12-27 18:30
Never mind . The fix was roughly the same and in the same area, so now we're covered on 2.7 as well.
History
Date
User
Action
Args
2022-04-11 14:57:28
admin
set
github: 58628
2012-12-27 18:30:35
brian.curtin
set
messages: +
2012-12-27 18:29:20
python-dev
set
messages: +
2012-12-27 16:33:12
brian.curtin
set
status: open -> closedversions: + Python 3.3, Python 3.4messages: + resolution: fixedstage: patch review -> resolved
2012-12-27 16:30:57
python-dev
set
nosy: + python-dev messages: +
2012-12-24 00:33:58
brian.curtin
link
issue16759 dependencies
2012-12-24 00:14:19
brian.curtin
set
keywords: + needs review , patch files: + issue14420_part1.diff messages: + stage: needs patch -> patch review
2012-03-27 15:27:29
RoSanford
set
messages: +
2012-03-27 13:05:48
brian.curtin
set
assignee: brian.curtin components: + Extension Modulesstage: needs patch
2012-03-27 08🔞22
tim.golden
set
nosy: + tim.golden , brian.curtin messages: +
2012-03-26 22:22:16
RoSanford
create