changeset: 91848:f7c84674bdec branch: 2.7 parent: 91845:3c4d45f73622 user: Serhiy Storchaka date: Fri Jul 25 12:23:08 2014 +0300 files: Lib/lib-tk/Tkinter.py description: Issue #22061: Add deprecation warnings in empty obsolete methods. diff -r 3c4d45f73622 -r f7c84674bdec Lib/lib-tk/Tkinter.py --- a/Lib/lib-tk/Tkinter.py Fri Jul 25 03:06:27 2014 -0400 +++ b/Lib/lib-tk/Tkinter.py Fri Jul 25 12:23:08 2014 +0300 @@ -425,7 +425,10 @@ + _flatten(args) + _flatten(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. @@ -2657,7 +2660,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):

AltStyle によって変換されたページ (->オリジナル) /