Re: [winreg] How to access "(Default)" key value?

2022-05-03 Thread MRAB
On 2022-05-03 10:31, Nicolas Formichella wrote: Hello, I am encountering an issue with winreg, I can't figure out how to read the "(Default)" of a registry value ``` def get_chrome_version() -> str: with winreg.ConnectRegistry(None, winreg.HKEY_CURRENT_USER

[winreg] How to access "(Default)" key value?

2022-05-03 Thread Nicolas Formichella
Hello, I am encountering an issue with winreg, I can't figure out how to read the "(Default)" of a registry value ``` def get_chrome_version() -> str: with winreg.ConnectRegistry(None, winreg.HKEY_CURRENT_USER) as registry: with winreg.OpenKeyEx(registry, r"

[issue45854] winreg: implement RegGetValue

2021-11-20 Thread Jiuding Tan
Change by Jiuding Tan <109224...@qq.com>: -- keywords: +patch pull_requests: +27922 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29684 ___ Python tracker

[issue45854] winreg: implement RegGetValue

2021-11-20 Thread 谭九鼎
I have implemented its body based on RegOpenKeyEx(), but I'm new to CPython and need some help. https://github.com/imba-tjd/cpython/tree/winreg -- components: Library (Lib) messages: 406663 nosy: imba-tjd priority: normal severity: normal status: open title: winreg: implement RegGetValu

[issue17600] mingw: build-in windows modules (winreg)

2021-10-21 Thread Irit Katriel
Change by Irit Katriel : -- resolution: duplicate -> wont fix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17600] mingw: build-in windows modules (winreg)

2021-10-20 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> MinGW is unsupported - close all open issues and list them here. ___ Python tracker

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Eryk Sun
Eryk Sun added the comment: > In any case, it should not be necessary to get Python permissions > to execute write / update methods in Python against HKLM hive HKEY_LOCAL_MACHINE is a predefined handle for the key "\REGISTRY\MACHINE". This key is not mounted by a hive. There are several

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Don't run VSCode in admin mode. Just set python to admin mode. See if it works then. -- ___ Python tracker ___

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Paul
Paul added the comment: "Here's something you should know about Windows, even if a local account is in the Administrators group, it still has restrictions on what it can do, it just has the power to elevate itself without requiring login credentials (VIA UAC prompts)." @William: Sure, I

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Paul
Paul added the comment: "The most easy way to do is right click on the application you're running the code from, click Run as Administrator and then run the code in that application. You'll not get any WinError. And also being in the Administrators group doesn't mean whatever application

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Eryk Sun
Eryk Sun added the comment: Thank you. The output shows that the Python process is using a UAC limited security context, i.e. the administrators group is enabled only for access-denied rules, and the integrity level is medium (not elevated to high or system level). Group Name:

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Paul
Paul added the comment: @Eryk: GROUP INFORMATION - Group Name: Everyone Type: Well-known group SID:S-1-1-0 Attributes: Mandatory group, Enabled by default, Enabled group Group Name: NT AUTHORITY\Local account and member of Administrators group Type:

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Eryk Sun
Eryk Sun added the comment: > The whoami process check output shows that my account is in > BUILTIN\Administrators, which proves that the account I am > logged in as local Administrator permissions. Please show the output when whoami.exe is spawned from Python. I never questioned whether

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: The most easy way to do is right click on the application you're running the code from, click Run as Administrator and then run the code in that application. You'll not get any WinError. And also being in the Administrators group doesn't mean whatever

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread William Pickard
William Pickard added the comment: Here's something you should know about Windows, even if a local account is in the Administrators group, it still has restrictions on what it can do, it just has the power to elevate itself without requiring login credentials (VIA UAC prompts). This group

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Paul
Paul added the comment: Eryk: The whoami process check output shows that my account is in BUILTIN\Administrators, which proves that the account I am logged in as local Administrator permissions. As for the OpenKey method, it fails with [WinError 5] Access denied, exactly the same way my

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-06 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Ok. I tested it. And I'm now completely sure that you're not running in Administrator mode. I'll give you the steps to solve this problem but first of all where are you running this code from, IDLE, Python or any other IDE? How to run in admin mode depends

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread William Pickard
William Pickard added the comment: Do you mind ticking the box, "Run as Administrator" in the Compatibility tab for python.exe and try winreg again? -- nosy: +WildCard65 ___ Python tracker <https://bugs.python.o

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Paul
Paul added the comment: *** Again, I am using a LOCAL ADMINISTRATIVE account. *** "Actually behind the scenes, winreg uses win32api which doesn't allow setting HKEY_LOCAL_MACHINE keys for unprivileged users. Running the application in admin mode may work because at that point

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Eryk Sun
system keys. > User is a local admin on the machine, and UAC is disabled as well. Please show the output from running the following: import subprocess import winreg print(subprocess.check_output('whoami.exe /groups /fo list', text=True)) hkey = winreg.HKEY_LOCA

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Shreyan Avigyan
gt; I can also write, update, modify, etc. anything in HKLM using C# just fine, > but NOT with winreg in Python. I've never used C# but as far as I know it doesn't use win32api while Python does. C# is specifically designed to work with these while C is not therefore it uses win32api. Pytho

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Paul
, etc. anything in HKLM using C# just fine, but NOT with winreg in Python. Note: Keep in mind that the exact same Registry write methods work as long as you are pointed to HKCU hive. However, if you point to HKLM and do not change anything else, winreg will throw a permissions error every time

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Actually behind the scenes, winreg uses win32api which doesn't allow setting HKEY_LOCAL_MACHINE keys for unprivileged users. Running the application in admin mode may work because at that point your application getting admin privileges but it also may

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Is it working if you run, whatever application you're running python on, in admin mode? -- nosy: +shreyanavigyan ___ Python tracker ___

[issue44046] When writing to the Registry using winreg, it currently allows you to write ONLY to HKEY_CURRENT_USERS.

2021-05-05 Thread Paul
ersion\\Winlogon', 0, winreg.KEY_ALL_ACCESS | winreg.KEY_WOW64_64KEY) winreg.SetValue(wholeKey, 'AutoAdminLogon', winreg.REG_SZ, '1') winreg.CloseKey(wholeKey) -- messages: 392982 nosy: paulenet priority: normal severity: normal status: open title: When writing to the Registry using winreg, it currently allow

[issue8579] Add missing tests for FlushKey, LoadKey, and SaveKey in winreg

2021-04-25 Thread Irit Katriel
Change by Irit Katriel : -- components: +Tests nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4 ___ Python tracker

[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-30 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-30 Thread miss-islington
miss-islington added the comment: New changeset 5486b105a4c5de840c24776c726eeac2a8dc973c by Miss Islington (bot) in branch '3.8': bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038) https://github.com/python/cpython/commit/5486b105a4c5de840c24776c726eeac2a8dc973c

[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-30 Thread miss-islington
miss-islington added the comment: New changeset f79577ddbd7c87b6cc1810e98ee4eaca7ae50699 by Miss Islington (bot) in branch '3.9': bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038) https://github.com/python/cpython/commit/f79577ddbd7c87b6cc1810e98ee4eaca7ae50699

[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-30 Thread miss-islington
Change by miss-islington : -- pull_requests: +23839 pull_request: https://github.com/python/cpython/pull/25094 ___ Python tracker ___

[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-30 Thread Dong-hee Na
Dong-hee Na added the comment: New changeset dfeec347f21b86879ba8f27f567bb275b243f1bc by Zackery Spytz in branch 'master': bpo-43637: Fix a possible memory leak in winreg.SetValueEx() (GH-25038) https://github.com/python/cpython/commit/dfeec347f21b86879ba8f27f567bb275b243f1bc --

[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-30 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +23838 pull_request: https://github.com/python/cpython/pull/25093 ___ Python tracker

[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-27 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +23786 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25038 ___ Python tracker

[issue43637] winreg: SetValueEx leaks memory if PySys_Audit fails

2021-03-27 Thread Ondrej Baranovič
in (2) should free the memory allocated in (1) if an audit hook raises. Introduced in PR17541. -- components: Windows messages: 389591 nosy: nulano, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: winreg: SetValueEx leaks memory

[issue21518] Expose RegUnLoadKey in winreg

2021-03-12 Thread Eryk Sun
Eryk Sun added the comment: I added an updated implementation of windows_helper.py to the dependency bpo-22080. -- components: +Windows nosy: +paul.moore versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5 ___ Python tracker

[issue42018] winreg SetValue(Ex) should mention integer as an acceptable value

2020-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka type: -> enhancement versions: +Python 3.10, Python 3.8 ___ Python tracker ___

[issue42018] winreg SetValue(Ex) should mention integer as an acceptable value

2020-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue42018] winreg SetValue(Ex) should mention integer as an acceptable value

2020-10-12 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +21644 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22671 ___ Python tracker

[issue42018] winreg SetValue(Ex) should mention integer as an acceptable value

2020-10-12 Thread Kevin Wojniak
hon/blob/3.9/Lib/test/test_winreg.py#L339 Suggested update: > value is a string or integer that specifies the new value. -- assignee: docs@python components: Documentation messages: 378508 nosy: docs@python, kwojniak_box priority: normal severity: normal status: open title: winreg Se

Re: Winreg

2020-07-31 Thread David L Neil via Python-list
On 31/07/2020 16:48, R Pasco wrote: Thanks for your extensive info. Its too bad this isn't published in the python winreg/_winreg modules' info. Ray Pasco Welcome to the world of documentation! Perhaps you have 'discovered' something, or maybe you're using the tool in an unusual way

Re: Winreg

2020-07-31 Thread R Pasco
needlessly confusing. Thanks for your extensive info. Its too bad this isn't published in the python winreg/_winreg modules' info. Ray Pasco On Fri, Jul 31, 2020 at 12:43 AM R Pasco wrote: > My code was simply experimental and will be much refined in the future > which will include specific e

Re: Winreg

2020-07-30 Thread Eryk Sun
ARE requires KEY_WOW64_64KEY > to be 'OR'ed. Winreg gives no indication of this requirement, but the > Windows doc "Redirected, Shared, and Reflected Keys Under WOW64" does > specifically mention HKEY_CURRENT_USER :SOFTWARE as needing this added > access. At the machine level, t

replying to the mailing list (was: Winreg)

2020-07-30 Thread Cameron Simpson
On 30Jul2020 20:25, Barry Scott wrote: >Use the Reply or Reply-To-All feature of your email program and it will do the >rest for you. Plain "reply" is often only "reply-to-author" for many mailers. I use "reply-to-all" myself, and edit the headers if that seems excessive. Some mailers (eg

Re: Winreg

2020-07-30 Thread dn via Python-list
On 31/07/2020 07:25, Barry Scott wrote: Use the Reply or Reply-To-All feature of your email program and it will do the rest for you. I can't find instructions for the proper way to reply to 'python list'. Is it simply a matter of keeping the message title identical to the original message

Re: Winreg

2020-07-30 Thread Barry Scott
le identical to the original > message and emailing again to python-list@python.org ? I'll reply both ways > to test this. > > Yes, it's the 64/32-bit views that got me stuck. I think I've got it mostly > figured out. The key HKEY_LOCAL_MACHINE:SOFTWARE requires KEY_WOW64_64KEY > to be 'OR'

Winreg

2020-07-30 Thread R Pasco
I've got it mostly figured out. The key HKEY_LOCAL_MACHINE:SOFTWARE requires KEY_WOW64_64KEY to be 'OR'ed. Winreg gives no indication of this requirement, but the Windows doc "Redirected, Shared, and Reflected Keys Under WOW64" does specifically mention HKEY_CURRENT_USER :SOFTWARE

Re: Winreg

2020-07-30 Thread Barry Scott
ou check that the key is present? > > I'm using regedit.exe to try to view it. > > Are you aware that there is one registry for 32 bit code and a separate > registry for 64 bit code. > > Only vaguely. Are the "separate" registries really 64 and 32 views of the one > an

Re: Winreg

2020-07-29 Thread Barry
ow do you check that the key is present? Are you aware that there is one registry for 32 bit code and a separate registry for 64 bit code. if you run a 32 bit program to write the registry it will not be seen by 64 bit code for example. Barry > > Code: > === &

Winreg

2020-07-29 Thread R Pasco
I'm running python 3.8 on Windows 8.1 x64. Running the following code produces no errors but does not add a key, name or value. I had no problems doing this using _wirreg under python 2.7. Any insight will be helpful. Code: === import winreg hive = winreg.HKEY_LOCAL_MACHINE

[issue39007] Add audit hooks to winreg module

2019-12-09 Thread miss-islington
miss-islington added the comment: New changeset 0ac9aaeb9727aa60bef918b619116a729d3ea56d by Miss Islington (bot) in branch '3.8': bpo-39007: Add auditing events to functions in winreg (GH-17541) https://github.com/python/cpython/commit/0ac9aaeb9727aa60bef918b619116a729d3ea56d

[issue39007] Add audit hooks to winreg module

2019-12-09 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue39007] Add audit hooks to winreg module

2019-12-09 Thread Steve Dower
Steve Dower added the comment: New changeset ee17e3735634c5fe15a43f897707de8011618627 by Steve Dower in branch 'master': bpo-39007: Add auditing events to functions in winreg (GH-17541) https://github.com/python/cpython/commit/ee17e3735634c5fe15a43f897707de8011618627

[issue39007] Add audit hooks to winreg module

2019-12-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +17019 pull_request: https://github.com/python/cpython/pull/17543 ___ Python tracker ___

[issue39007] Add audit hooks to winreg module

2019-12-09 Thread Steve Dower
Change by Steve Dower : -- keywords: +patch pull_requests: +17017 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/17541 ___ Python tracker

[issue39007] Add audit hooks to winreg module

2019-12-09 Thread Steve Dower
New submission from Steve Dower : The winreg module should have hooks added. -- assignee: steve.dower components: Windows messages: 358119 nosy: christian.heimes, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Add

[issue8579] Add missing tests for FlushKey, LoadKey, and SaveKey in winreg

2019-06-23 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: @Claudiu.Popa are you still interested in working on this, If so please open a pull request for review. -- nosy: +nanjekyejoannah ___ Python tracker

[issue28011] winreg KEY_READ also fails for some keys

2016-09-08 Thread Eryk Sun
Eryk Sun added the comment: It's not a bug that you can't read those keys. The DACL (discretionary access control list) of those two keys doesn't grant any access to standard users. However, administrators do have full control, in case your account is a UAC restricted admin with a split

[issue28011] winreg KEY_READ also fails for some keys

2016-09-07 Thread Pabitra
Pabitra added the comment: Same applies for Python 3.5 as well. -- versions: +Python 3.5 ___ Python tracker ___

[issue28011] winreg KEY_READ also fails for some keys

2016-09-07 Thread Pabitra
components: Windows files: Winreg.jpg messages: 274951 nosy: pabitra, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: winreg KEY_READ also fails for some keys type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file44456/Winreg.jpg

Re: Good Tutorial for Python3 winreg Module

2016-08-20 Thread eryk sun
On Sun, Aug 21, 2016 at 3:55 AM, <johncalvinh...@gmail.com> wrote: > > I need to pull a saved value from the registry, and the only way I > know how to get it is through winreg. Here's an example that reads the value and type of "Temp" in HKCU\Enviro

Good Tutorial for Python3 winreg Module

2016-08-20 Thread johncalvinhall
Does anyone have a good tutorial on how to use the Python 3 module winreg? I need to pull a saved value from the registry, and the only way I know how to get it is through winreg. If anyone is able to help, I sure would appreciate it. -- https://mail.python.org/mailman/listinfo/python-list

[issue17600] mingw: build-in windows modules (winreg)

2016-07-28 Thread Martin Panter
Martin Panter added the comment: Here is a quick merge with the current code. First concern: The patch adds special support if KEY_WOW64_64KEY is not defined, claiming to be for _WIN32_WINNT < 0x502, however these days I think Python dropped support for Windows XP etc, so we can probably drop

[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 ___

[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

[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:

[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, Qu

[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:

[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

[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, "

[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

[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

[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) --

[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

[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

[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

[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

[issue21518] Expose RegUnLoadKey in winreg

2015-04-30 Thread Claudiu Popa
Claudiu Popa added the comment: Hello, Can anyone review the last patch? Hopefully it is the final version, since the beta is really at the corner and I definitely would like to have this in 3.5. -- ___ Python tracker rep...@bugs.python.org

[issue21518] Expose RegUnLoadKey in winreg

2015-03-14 Thread Claudiu Popa
Claudiu Popa added the comment: Thank you for the review. The new patch uses the name UnLoadKey for the API. -- Added file: http://bugs.python.org/file38481/issue21518_6.patch ___ Python tracker rep...@bugs.python.org

[issue21518] Expose RegUnLoadKey in winreg

2015-03-13 Thread Martin v . Löwis
it differently. (*) It's UnlockFile that pairs LockFile, and UnmapViewOfFile that matches MapViewOfFile. OTOH, (undocumented) UTRegister is paired with UTUnRegister, and GlobalWire with GlobalUnWire. -- nosy: +loewis title: Expose RegUnloadKey in winreg - Expose RegUnLoadKey in winreg

[issue21518] Expose RegUnloadKey in winreg

2015-03-07 Thread Claudiu Popa
Changes by Claudiu Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file38382/issue21518_5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___

[issue21518] Expose RegUnloadKey in winreg

2015-01-22 Thread Claudiu Popa
Claudiu Popa added the comment: Ups, the last patch included an extra file. -- Added file: http://bugs.python.org/file37819/issue21518_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518

[issue21518] Expose RegUnloadKey in winreg

2015-01-22 Thread Claudiu Popa
Changes by Claudiu Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file37820/issue21518_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___

[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'

[issue21518] Expose RegUnloadKey in winreg

2015-01-17 Thread Claudiu Popa
Claudiu Popa added the comment: The new patch drops the weird error dance from test_unload_key, it seems to work without it, I don't remember how it failed without it. -- Added file: http://bugs.python.org/file37742/issue21518_2.patch ___ Python

[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

[issue21518] Expose RegUnloadKey in winreg

2014-09-25 Thread Claudiu Popa
Claudiu Popa added the comment: Is there something I can do to move this forward? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___ ___

[issue21518] Expose RegUnloadKey in winreg

2014-07-26 Thread Claudiu Popa
Changes by Claudiu Popa pcmantic...@gmail.com: -- dependencies: +Add windows_helper module helper ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___

[issue21518] Expose RegUnloadKey in winreg

2014-07-08 Thread Claudiu Popa
Claudiu Popa added the comment: Here's the patch with only the change for winreg.UnloadKey. I'll have the patch with windows_helper soon. -- Added file: http://bugs.python.org/file35907/winreg_unload_key.patch ___ Python tracker

[issue21518] Expose RegUnloadKey in winreg

2014-07-07 Thread Zachary Ware
Zachary Ware added the comment: I'd like to see the windows_helper.py part of the patch split into its own issue, and someone more qualified than I to review it (though I'll learn what I can and give it a shot if nobody else can). The new issue should also try to use the new windows_helper

[issue21518] Expose RegUnloadKey in winreg

2014-07-07 Thread Claudiu Popa
Claudiu Popa added the comment: Sure, that sounds good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___ ___ Python-bugs-list mailing

  1   2   3   >