[Python-checkins] cpython (3.4): Issue #22061: Add deprecation warnings in empty obsolete methods.
serhiy.storchaka
python-checkins at python.org
Fri Jul 25 11:31:56 CEST 2014
http://hg.python.org/cpython/rev/a50297e793f9
changeset: 91849:a50297e793f9
branch: 3.4
parent: 91846:976f31b2858b
user: Serhiy Storchaka <storchaka at gmail.com>
date: Fri Jul 25 12:24:07 2014 +0300
summary:
Issue #22061: Add deprecation warnings in empty obsolete methods.
files:
Lib/tkinter/__init__.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -421,7 +421,10 @@
+ _flatten(args) + _flatten(list(kw.items())))
def tk_menuBar(self, *args):
"""Do not use. Needed in Tk 3.6 and earlier."""
- pass # obsolete since Tk 4.0
+ # obsolete since Tk 4.0
+ import warnings
+ warnings.warn('tk_menuBar() does nothing and will be removed in 3.6',
+ DeprecationWarning, stacklevel=2)
def wait_variable(self, name='PY_VAR'):
"""Wait until the variable is modified.
@@ -2674,7 +2677,11 @@
selectcolor, takefocus, tearoff, tearoffcommand, title, type."""
Widget.__init__(self, master, 'menu', cnf, kw)
def tk_bindForTraversal(self):
- pass # obsolete since Tk 4.0
+ # obsolete since Tk 4.0
+ import warnings
+ warnings.warn('tk_bindForTraversal() does nothing and '
+ 'will be removed in 3.6',
+ DeprecationWarning, stacklevel=2)
def tk_mbPost(self):
self.tk.call('tk_mbPost', self._w)
def tk_mbUnpost(self):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list