From cb6c6648bea57046d5ceff9382f19ebae024b918 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Tue, 3 May 2022 01:25:52 +0300 Subject: bpo-46547: remove leaking vars into `pydoc.Helper` namespace (#30957) Fixes #90705 --- Lib/pydoc.py | 1 + Misc/NEWS.d/next/Library/2022-01-27-14-41-55.bpo-46547.JMyYz9.rst | 1 + 2 files changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2022-01-27-14-41-55.bpo-46547.JMyYz9.rst diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 12c2bb4..297ff96 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -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 index 0000000..83065a7 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-01-27-14-41-55.bpo-46547.JMyYz9.rst @@ -0,0 +1 @@ +Remove variables leaking into ``pydoc.Helper`` class namespace. -- cgit v0.12