diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-03-21 21:52:59 (GMT) |
---|---|---|
committer | Andrew Svetlov <andrew.svetlov@gmail.com> | 2012-03-21 21:52:59 (GMT) |
commit | a966c6fddb070cdc392b38486191699815f90478 (patch) | |
tree | eb0c2e743417be68548aa127c33c039286bd06ba /Lib/tkinter | |
parent | 04fb08f6907c8e00947435e346c919da313116a6 (diff) | |
download | cpython-a966c6fddb070cdc392b38486191699815f90478.zip cpython-a966c6fddb070cdc392b38486191699815f90478.tar.gz cpython-a966c6fddb070cdc392b38486191699815f90478.tar.bz2 |
Issue #3035: Unused functions from tkinter are marked as pending peprecated.
Diffstat (limited to 'Lib/tkinter')
-rw-r--r-- | Lib/tkinter/__init__.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index ef082bf..3770ca9 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -34,10 +34,14 @@ import sys if sys.platform == "win32": # Attempt to configure Tcl/Tk without requiring PATH from tkinter import _fix + +import warnings + import _tkinter # If this fails your Python may not be configured for Tk TclError = _tkinter.TclError from tkinter.constants import * + wantobjects = 1 TkVersion = float(_tkinter.TK_VERSION) @@ -2118,25 +2122,45 @@ class Button(Widget): """ return self.tk.call(self._w, 'invoke') + # Indices: # XXX I don't like these -- take them away def AtEnd(): + warnings.warn("tkinter.AtEnd will be removed in 3.5", + PendingDeprecationWarning, stacklevel=2) return 'end' + + def AtInsert(*args): + warnings.warn("tkinter.AtInsert will be removed in 3.5", + PendingDeprecationWarning, stacklevel=2) s = 'insert' for a in args: if a: s = s + (' ' + a) return s + + def AtSelFirst(): + warnings.warn("tkinter.AtSelFirst will be removed in 3.5", + PendingDeprecationWarning, stacklevel=2) return 'sel.first' + + def AtSelLast(): + warnings.warn("tkinter.AtSelLast will be removed in 3.5", + PendingDeprecationWarning, stacklevel=2) return 'sel.last' + + def At(x, y=None): + warnings.warn("tkinter.At will be removed in 3.5", + PendingDeprecationWarning, stacklevel=2) if y is None: return '@%r' % (x,) else: return '@%r,%r' % (x, y) + class Canvas(Widget, XView, YView): """Canvas widget to display graphical elements like lines or text.""" def __init__(self, master=None, cnf={}, **kw): |