[issue37746] Provide Windows predefined access type constants

2020-06-03 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +19843 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20617 ___ Python tracker

[issue37746] Provide Windows predefined access type constants

2019-08-02 Thread Eryk Sun
Eryk Sun added the comment: > Perhaps _winapi is the best place? It already includes CreateFile and > OpenProcess, both of which also use these flags and already have some > of the "preconstructed" values exposed. I'd like to see an os.windows namespace, with os.windows.constants and

[issue37746] Provide Windows predefined access type constants

2019-08-02 Thread Steve Dower
Steve Dower added the comment: At least the first five can be used to open keys with even less rights than default, which can sometimes be necessary for keys with obscure ACLs. Having the constants present is also helpful when rendering a text view. Perhaps _winapi is the best place? It

[issue37746] Provide Windows predefined access type constants

2019-08-02 Thread Eryk Sun
Eryk Sun added the comment: The STANDARD_RIGHTS_* and SPECIFIC_RIGHTS_ALL constants aren't used much in practice. Do you have a particular case that needs them? I don't think we have direct use for the standard rights constants in winreg. For example, deleting a key via winreg.DeleteKeyEx

[issue37746] Provide Windows predefined access type constants

2019-08-02 Thread Steve Dower
New submission from Steve Dower : We currently do not provide the standard access type constants anywhere, despite providing some of the specific access type flags (e.g. in `winreg`): #define DELETE (0x0001L) #define READ_CONTROL (0x0002L)