[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-06-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5306f27c53aa by Serhiy Storchaka in branch 'default': Regenerate Argument Clinic code for issue #23026. https://hg.python.org/cpython/rev/5306f27c53aa -- ___ Python tracker

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Zachary Ware
Changes by Zachary Ware : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Mark Grandi
Mark Grandi added the comment: Oh, I didn't realize that both REG_QWORD and REG_QWORD_LITTLE_ENDIAN had the same value, that works then. -- resolution: fixed -> status: closed -> open ___ Python tracker _

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset ed4eec682199 by Steve Dower in branch 'default': Closes #23026: Documentation improvements and code formatting https://hg.python.org/cpython/rev/ed4eec682199 -- resolution: -> fixed stage: commit review -> resolved status: open -> closed _

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Steve Dower
Steve Dower added the comment: Thanks! I don't think we need to mention doc changes in whatsnew, but I've made the description more general and added the "New in version 3.6" notes to the winreg page. The formatting was presumably copied from the surrounding code, but I've fixed all instance

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Mark Grandi
Mark Grandi added the comment: in 'test_winreg.py', there should probably be a test that covers REG_QWORD_LITTLE_ENDIAN, even if they are essentially equivalent Also, in Py2Reg and Reg2Py, it seems that both are missing the 'case' clause for REG_QWORD_LITTLE_ENDIAN as well case REG_QWORD: ca

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-25 Thread Eryk Sun
Eryk Sun added the comment: In Py2Reg, `(*retDataBuf==NULL)` needs spaces around the == operator. Should the changes to the winreg docs be noted as new in 3.6? Bikeshedding: in "What's New" you mention the change to QueryValueEx, but Reg2Py and Py2Reg affect EnumValue, QueryValueEx, and SetVa

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-24 Thread Steve Dower
Steve Dower added the comment: I'd appreciate at least one other person looking over my commit before I close this, just to confirm that the notes I added to the docs are fine. -- stage: -> commit review ___ Python tracker

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac2a2534f793 by Steve Dower in branch 'default': Issue #23026: winreg.QueryValueEx() now return an integer for REG_QWORD type. (Patch by hakril) https://hg.python.org/cpython/rev/ac2a2534f793 -- nosy: +python-dev __

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-24 Thread Zachary Ware
Zachary Ware added the comment: Clement Rouault added the comment: > Stated as you did, it makes sens. Should the change of return type be > acknowledged somewhere in the documentation ? Yes, it should be mentioned in Doc/whatsnew/3.6.rst and probably also somewhere in Doc/library/winreg.rst -

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-24 Thread Clement Rouault
Clement Rouault added the comment: Stated as you did, it makes sens. Should the change of return type be acknowledged somewhere in the documentation ? -- ___ Python tracker ___

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-24 Thread Steve Dower
Steve Dower added the comment: Changing a return value type without notice certainly can't go into a maintenance release. I'd assumed an extra import too, but since it's transparent this is 3.6 only (definitely not a security fix, so 2.7 isn't up for discussion). -- versions: -Python

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-24 Thread Paul Moore
Paul Moore added the comment: Hmm, OK. So code that currently needs to access QWORD values and decodes the bytes returned would be broken by this change. Equally it is possible (albeit not ideal) to get the data out with the current behaviour. I can't judge how likely it is that anyone has wri

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-24 Thread Clement Rouault
Clement Rouault added the comment: My comment was about the behavior of `winreg.QueryValueEx`. The current behavior is: >>> import winreg >>> tstkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, "TestKey") >>> winreg.QueryValueEx(tstkey, "MYDWORD") # a REG_DWORD value (16909060, 4) >>> winreg.Quer

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-24 Thread Paul Moore
Paul Moore added the comment: I'm not sure I follow your comment. In Python 3.5, >>> from winreg import REG_QWORD Traceback (most recent call last): File "", line 1, in ImportError: cannot import name 'REG_QWORD' So exposing REG_QWORD from the winreg module would be a change in behaviour, n

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-24 Thread Clement Rouault
Clement Rouault added the comment: I would like to discuss the fact that this patch is a new feature. In the current state, CPython handles the `REG_QWORD` type as an unkown type and returns the raw registry value: a string of size 8. In my opinion this behavior does not match the Windows docum

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Mark Grandi
Mark Grandi added the comment: @hakril: ok, that makes sense, I'm not a windows/win32 programmer by any means so I was mostly going on the microsoft web docs also the patch by hakril includes the documentation from my patch, so that patch should be the one considered (as a FYI) -- ver

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Steve Dower
Steve Dower added the comment: IIRC, the preferred typedef is ULONGLONG, but it's not really a big deal. Avoiding new header files is a good enough reason. I think Paul's right about 3.6 only. We shouldn't encourage code that won't work downlevel within the same version, and there is a ctypes

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Clement Rouault
Clement Rouault added the comment: Because `QWORD` is not defined in any file included by CPython. The main file for basic sized type definition in Windows is: basetsd.h: Type definitions for the basic sized types. which contains the definition of `DWORD64`: `typedef unsigned __int64 DWORD

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Mark Grandi
Mark Grandi added the comment: why do you say that QWORD is not present in windows.h? I found it here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx typedef unsigned __int64 QWORD; -- ___ Python tracker

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Paul Moore
Paul Moore added the comment: My instinct is that this should only go into 3.6. It's a remote possibility, but someone could otherwise write code that uses REG_DWORD64 and say that it "works on 3.5" because they tested on 3.5.x, only to have it fail on 3.5.1. But if someone with a better feel

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Steve Dower
Steve Dower added the comment: Looks good to me. (In case someone else applies the patch, there are a few mixed tab/spaces that should be fixed.) I'm personally okay with adding this to 3.5, but technically I think it's a new feature and should be in 3.6 only. Anyone else have an opinion here?

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Clement Rouault
Clement Rouault added the comment: I also stumbled on this issue when playing with the winreg module. I will try to make the discussion go forward by submitting a new patch. I added a test and tried everything (test included on 3.5) on my own computer (windows 8.1 64b) There are two points that

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Clement Rouault
Changes by Clement Rouault : -- nosy: +hakril ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2015-01-22 Thread Mark Grandi
Mark Grandi added the comment: I Attempted to modify Reg2Py and Py2Reg to handle the QWORDs, this is assuming that the only thing that needs to change is just using PyLong_AsUnsignedLongLong()/FromUnsignedLongLong() instead of just UnsignedLong() the patch has the same changes as the 'part1'

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2014-12-10 Thread Mark Grandi
New submission from Mark Grandi: The winreg module has constants for the different Windows registry types: https://docs.python.org/3/library/winreg.html?highlight=winreg#value-types It also links to the Microsoft documentation on the registry types, and I noticed that python doesn't have const