]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46547: remove leaking vars into `pydoc.Helper` namespace (#30957)
authorNikita Sobolev <mail@sobolevn.me>
Mon, 2 May 2022 22:25:52 +0000 (01:25 +0300)
committerGitHub <noreply@github.com>
Mon, 2 May 2022 22:25:52 +0000 (16:25 -0600)
Fixes #90705

Lib/pydoc.py
Misc/NEWS.d/next/Library/2022-01-27-14-41-55.bpo-46547.JMyYz9.rst [new file with mode: 0644]

index 12c2bb450e4f51b7937dda805e0ff2fb6eb25fc4..297ff967a2ce9cb0ad3c33b69c9ea7173eb641b5 100755 (executable)
@@ -1891,6 +1891,7 @@ class Helper:
             if topic not in topics:
                 topics = topics + ' ' + topic
             symbols[symbol] = topics
+    del topic, symbols_, symbol, topics
 
     topics = {
         'TYPES': ('types', 'STRINGS UNICODE NUMBERS SEQUENCES MAPPINGS '
diff --git a/Misc/NEWS.d/next/Library/2022-01-27-14-41-55.bpo-46547.JMyYz9.rst b/Misc/NEWS.d/next/Library/2022-01-27-14-41-55.bpo-46547.JMyYz9.rst
new file mode 100644 (file)
index 0000000..83065a7
--- /dev/null
@@ -0,0 +1 @@
+Remove variables leaking into ``pydoc.Helper`` class namespace.