cpython: d42f264f291e (original) (raw)
Mercurial > cpython
changeset 75864:d42f264f291e
Issue #3035: Unused functions from tkinter are marked as pending peprecated. [#3035]
Andrew Svetlov andrew.svetlov@gmail.com | |
---|---|
date | Wed, 21 Mar 2012 23:52:59 +0200 |
parents | 8af880dd216e |
children | 2514a4e2b3ce |
files | Lib/tkinter/__init__.py Misc/NEWS |
diffstat | 2 files changed, 26 insertions(+), 0 deletions(-)[+] [-] Lib/tkinter/__init__.py 24 Misc/NEWS 2 |
line wrap: on
line diff
--- 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
- warnings.warn("tkinter.AtEnd will be removed in 3.5",
return 'end' + + def AtInsert(*args):PendingDeprecationWarning, stacklevel=2)[](#l1.27)
- warnings.warn("tkinter.AtInsert will be removed in 3.5",
s = 'insert' for a in args: if a: s = s + (' ' + a) return s + + def AtSelFirst():PendingDeprecationWarning, stacklevel=2)[](#l1.33)
- warnings.warn("tkinter.AtSelFirst will be removed in 3.5",
return 'sel.first' + + def AtSelLast():PendingDeprecationWarning, stacklevel=2)[](#l1.42)
- warnings.warn("tkinter.AtSelLast will be removed in 3.5",
return 'sel.last' + + def At(x, y=None):PendingDeprecationWarning, stacklevel=2)[](#l1.48)
- warnings.warn("tkinter.At will be removed in 3.5",
if y is None: return '@%r' % (x,) else: return '@%r,%r' % (x, y)PendingDeprecationWarning, stacklevel=2)[](#l1.54)
+ class Canvas(Widget, XView, YView): """Canvas widget to display graphical elements like lines or text.""" def init(self, master=None, cnf={}, **kw):
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -30,6 +30,8 @@ Core and Builtins Library ------- +- Issue #3035: Unused functions from tkinter are marked as pending peprecated. +