From b66f50609339fb725531fedf789e773bced475a2 Mon Sep 17 00:00:00 2001 From: AN Long Date: Fri, 7 Nov 2025 00:33:30 +0900 Subject: [PATCH 1/2] [3.14] gh-140826: Update winreg's docstring (GH-141050) (cherry picked from commit bea0d3d12bcd122d8498b92cdd6c724822fd6505) Co-authored-by: AN Long --- PC/winreg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PC/winreg.c b/PC/winreg.c index b7b26411f2b1e9..5b7aa1e7d582cf 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -51,6 +51,7 @@ PyDoc_STRVAR(module_doc, "CreateKey() - Creates the specified key, or opens it if it already exists.\n" "DeleteKey() - Deletes the specified key.\n" "DeleteValue() - Removes a named value from the specified registry key.\n" +"DeleteTree() - Deletes the specified key and all its subkeys and values recursively.\n" "EnumKey() - Enumerates subkeys of the specified open registry key.\n" "EnumValue() - Enumerates values of the specified open registry key.\n" "ExpandEnvironmentStrings() - Expand the env strings in a REG_EXPAND_SZ\n" @@ -101,7 +102,10 @@ PyDoc_STRVAR(PyHKEY_doc, "\n" "Operations:\n" "__bool__ - Handles with an open object return true, otherwise false.\n" -"__int__ - Converting a handle to an integer returns the Win32 handle."); +"__int__ - Converting a handle to an integer returns the Win32 handle.\n" +"__enter__, __exit__ - Context manager support for 'with' statement,\n" +"automatically closes handle.\n" +"__eq__, __ne__ - Equality comparison based on Windows handle value."); From 8c206785c6e1fcbcd6767be5b39ba14d31a1c574 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 7 Nov 2025 17:22:16 +0200 Subject: [PATCH 2/2] Update PC/winreg.c Co-authored-by: AN Long --- PC/winreg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PC/winreg.c b/PC/winreg.c index 5b7aa1e7d582cf..fc649e10bac944 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -104,8 +104,7 @@ PyDoc_STRVAR(PyHKEY_doc, "__bool__ - Handles with an open object return true, otherwise false.\n" "__int__ - Converting a handle to an integer returns the Win32 handle.\n" "__enter__, __exit__ - Context manager support for 'with' statement,\n" -"automatically closes handle.\n" -"__eq__, __ne__ - Equality comparison based on Windows handle value."); +"automatically closes handle.");