]> granicus.if.org Git - python/commitdiff
Issue #22061: Add deprecation warnings in empty obsolete methods.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 25 Jul 2014 09:23:08 +0000 (12:23 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 25 Jul 2014 09:23:08 +0000 (12:23 +0300)
Lib/lib-tk/Tkinter.py

index d3d7d839592f6d980c92c1d0857ddd83821f7465..ee49ed729317e8bf2b5c7b7f2cb547a02f2a83f6 100644 (file)
@@ -425,7 +425,10 @@ class Misc:
               + _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 @@ class Menu(Widget):
         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):