cpython: c607004a98bf (original) (raw)
Mercurial > cpython
changeset 98205:c607004a98bf 3.4
Issue #16893: Move idlelib.EditorWindow.HelpDialog deprecation warning so it is not triggered on import. The problem is creation of a now-unused instance "helpDialog = HelpDialog()", left for back compatibility. So instead trigger the warning when that instance or another is used. [#16893]
Terry Jan Reedy tjreedy@udel.edu | |
---|---|
date | Tue, 22 Sep 2015 22:59:40 -0400 |
parents | ff7aba08ada6 |
children | 16b9207225d4 1fc049e5ec14 |
files | Lib/idlelib/EditorWindow.py |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-)[+] [-] Lib/idlelib/EditorWindow.py 10 |
line wrap: on
line diff
--- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -43,11 +43,6 @@ def _sphinx_version(): class HelpDialog(object): def init(self):
import warnings as w[](#l1.7)
w.warn("EditorWindow.HelpDialog is no longer used by Idle.\n"[](#l1.8)
"It will be removed in 3.6 or later.\n"[](#l1.9)
"It has been replaced by private help.HelpWindow\n",[](#l1.10)
DeprecationWarning, stacklevel=2)[](#l1.11) self.parent = None # parent of help window[](#l1.12) self.dlg = None # the help window iteself[](#l1.13)
@@ -59,6 +54,11 @@ class HelpDialog(object): near - a Toplevel widget (e.g. EditorWindow or PyShell) to use as a reference for placing the help window """
import warnings as w[](#l1.19)
w.warn("EditorWindow.HelpDialog is no longer used by Idle.\n"[](#l1.20)
"It will be removed in 3.6 or later.\n"[](#l1.21)
"It has been replaced by private help.HelpWindow\n",[](#l1.22)
DeprecationWarning, stacklevel=2)[](#l1.23) if self.dlg is None:[](#l1.24) self.show_dialog(parent)[](#l1.25) if near:[](#l1.26)