Skip to content

bpo-35026: Mention required permissions in the winreg.DeleteKey*() docs #24547

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Feb 15, 2021

Use the exact warning text from the docs for winreg.SetValue()
and winreg.SetValueEx().

https://bugs.python.org/issue35026

Use the exact warning text from the docs for winreg.SetValue()
and winreg.SetValueEx().
@@ -131,6 +131,9 @@ This module offers the following functions:

*This method can not delete keys with subkeys.*

The key identified by the *key* parameter must have been opened with
:const:`KEY_SET_VALUE` access.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the message I left on the tracker, this should state that key can have any access. It's only used to resolve the relative path in sub_key.

@@ -165,6 +168,9 @@ This module offers the following functions:

*This method can not delete keys with subkeys.*

The key identified by the *key* parameter must have been opened with
:const:`KEY_SET_VALUE` access.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the message I left on the tracker, this should state that key can have any access. It's only used to resolve the relative path in sub_key.

Also, using KEY_WOW64_64KEY instead of 0 as the default value of access is wrong (i.e. it's the wrong default behavior for 32-bit Python). And the usage of KEY_WOW64_64KEY and KEY_WOW64_32KEY -- the only relevant access modes for sub_key -- should probably be discussed in terms how the relative path in sub_key is traversed starting from the path of the key that's referenced by the key handle.

@github-actions
Copy link

github-actions bot commented Apr 1, 2021

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 1, 2021
@JelleZijlstra
Copy link
Member

Closing as @eryksun's comments haven't been addressed and it's been more than a year. Feel free to reopen this PR or open a new one if you'd like to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes docs Documentation in the Doc dir stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants