[Python-checkins] cpython (merge 3.4 -> default): Issue #22061: Restored empty obsolete methods removed in issue #4350 and

serhiy.storchaka python-checkins at python.org
Fri Jul 25 11:31:57 CEST 2014


http://hg.python.org/cpython/rev/7e6beea0eeab
changeset:   91850:7e6beea0eeab
parent:      91847:9e9e6e9f4cce
parent:      91849:a50297e793f9
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Fri Jul 25 12:29:40 2014 +0300
summary:
  Issue #22061: Restored empty obsolete methods removed in issue #4350 and
added deprecation warnings to them.

files:
  Lib/tkinter/__init__.py |  12 ++++++++++++
  1 files changed, 12 insertions(+), 0 deletions(-)


diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -419,6 +419,12 @@
         disabledForeground, insertBackground, troughColor."""
         self.tk.call(('tk_setPalette',)
               + _flatten(args) + _flatten(list(kw.items())))
+    def tk_menuBar(self, *args):
+        """Do not use. Needed in Tk 3.6 and earlier."""
+        # 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.
 
@@ -2660,6 +2666,12 @@
     def tk_popup(self, x, y, entry=""):
         """Post the menu at position X,Y with entry ENTRY."""
         self.tk.call('tk_popup', self._w, x, y, entry)
+    def tk_bindForTraversal(self):
+        # obsolete since Tk 4.0
+        import warnings
+        warnings.warn('tk_bindForTraversal() does nothing and '
+                      'will be removed in 3.6',
+                      DeprecationWarning, stacklevel=2)
     def activate(self, index):
         """Activate entry at INDEX."""
         self.tk.call(self._w, 'activate', index)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list