Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
456b2b87
Commit
456b2b87
authored
Oct 04, 2012
by
Andrew Svetlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #14446: Remove deprecated tkinter functions
Thanks to Michael Driscoll
parent
65e9c573
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
153 deletions
+0
-153
Doc/library/tkinter.rst
Doc/library/tkinter.rst
+0
-26
Lib/tkinter/__init__.py
Lib/tkinter/__init__.py
+0
-39
Modules/_tkinter.c
Modules/_tkinter.c
+0
-88
No files found.
Doc/library/tkinter.rst
View file @
456b2b87
...
...
@@ -750,32 +750,6 @@ Entry widget indexes (index, view index, etc.)
displayed. You can use these :mod:`tkinter` functions to access these special
points in text widgets:
.. function:: AtEnd()
refers to the last position in the text
.. deprecated:: 3.3
.. function:: AtInsert()
refers to the point where the text cursor is
.. deprecated:: 3.3
.. function:: AtSelFirst()
indicates the beginning point of the selected text
.. deprecated:: 3.3
.. function:: AtSelLast()
denotes the last point of the selected text and finally
.. deprecated:: 3.3
.. function:: At(x[, y])
refers to the character at pixel location *x*, *y* (with *y* not used in the
case of a text entry widget, which contains a single line of text).
.. deprecated:: 3.3
Text widget indexes
The index notation for Text widgets is very rich and is best described in the Tk
man pages.
...
...
Lib/tkinter/__init__.py
View file @
456b2b87
...
...
@@ -2146,45 +2146,6 @@ 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.4"
,
DeprecationWarning
,
stacklevel
=
2
)
return
'end'
def
AtInsert
(
*
args
):
warnings
.
warn
(
"tkinter.AtInsert will be removed in 3.4"
,
DeprecationWarning
,
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.4"
,
DeprecationWarning
,
stacklevel
=
2
)
return
'sel.first'
def
AtSelLast
():
warnings
.
warn
(
"tkinter.AtSelLast will be removed in 3.4"
,
DeprecationWarning
,
stacklevel
=
2
)
return
'sel.last'
def
At
(
x
,
y
=
None
):
warnings
.
warn
(
"tkinter.At will be removed in 3.4"
,
DeprecationWarning
,
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
):
...
...
Modules/_tkinter.c
View file @
456b2b87
...
...
@@ -1331,42 +1331,6 @@ Tkapp_Call(PyObject *selfptr, PyObject *args)
}
static
PyObject
*
Tkapp_GlobalCall
(
PyObject
*
self
,
PyObject
*
args
)
{
/* Could do the same here as for Tkapp_Call(), but this is not used
much, so I can't be bothered. Unfortunately Tcl doesn't export a
way for the user to do what all its Global* variants do (save and
reset the scope pointer, call the local version, restore the saved
scope pointer). */
char
*
cmd
;
PyObject
*
res
=
NULL
;
if
(
PyErr_WarnEx
(
PyExc_DeprecationWarning
,
"globalcall is deprecated and will be removed in 3.4"
,
1
)
<
0
)
return
0
;
CHECK_TCL_APPARTMENT
;
cmd
=
Merge
(
args
);
if
(
cmd
)
{
int
err
;
ENTER_TCL
err
=
Tcl_GlobalEval
(
Tkapp_Interp
(
self
),
cmd
);
ENTER_OVERLAP
if
(
err
==
TCL_ERROR
)
res
=
Tkinter_Error
(
self
);
else
res
=
PyUnicode_FromString
(
Tkapp_Result
(
self
));
LEAVE_OVERLAP_TCL
ckfree
(
cmd
);
}
return
res
;
}
static
PyObject
*
Tkapp_Eval
(
PyObject
*
self
,
PyObject
*
args
)
{
...
...
@@ -1390,34 +1354,6 @@ Tkapp_Eval(PyObject *self, PyObject *args)
return
res
;
}
static
PyObject
*
Tkapp_GlobalEval
(
PyObject
*
self
,
PyObject
*
args
)
{
char
*
script
;
PyObject
*
res
=
NULL
;
int
err
;
if
(
PyErr_WarnEx
(
PyExc_DeprecationWarning
,
"globaleval is deprecated and will be removed in 3.4"
,
1
)
<
0
)
return
0
;
if
(
!
PyArg_ParseTuple
(
args
,
"s:globaleval"
,
&
script
))
return
NULL
;
CHECK_TCL_APPARTMENT
;
ENTER_TCL
err
=
Tcl_GlobalEval
(
Tkapp_Interp
(
self
),
script
);
ENTER_OVERLAP
if
(
err
==
TCL_ERROR
)
res
=
Tkinter_Error
(
self
);
else
res
=
PyUnicode_FromString
(
Tkapp_Result
(
self
));
LEAVE_OVERLAP_TCL
return
res
;
}
static
PyObject
*
Tkapp_EvalFile
(
PyObject
*
self
,
PyObject
*
args
)
{
...
...
@@ -1961,27 +1897,6 @@ Tkapp_Split(PyObject *self, PyObject *args)
return
v
;
}
static
PyObject
*
Tkapp_Merge
(
PyObject
*
self
,
PyObject
*
args
)
{
char
*
s
;
PyObject
*
res
=
NULL
;
if
(
PyErr_WarnEx
(
PyExc_DeprecationWarning
,
"merge is deprecated and will be removed in 3.4"
,
1
)
<
0
)
return
0
;
s
=
Merge
(
args
);
if
(
s
)
{
res
=
PyUnicode_FromString
(
s
);
ckfree
(
s
);
}
return
res
;
}
/** Tcl Command **/
...
...
@@ -2695,9 +2610,7 @@ static PyMethodDef Tkapp_methods[] =
{
"willdispatch"
,
Tkapp_WillDispatch
,
METH_NOARGS
},
{
"wantobjects"
,
Tkapp_WantObjects
,
METH_VARARGS
},
{
"call"
,
Tkapp_Call
,
METH_VARARGS
},
{
"globalcall"
,
Tkapp_GlobalCall
,
METH_VARARGS
},
{
"eval"
,
Tkapp_Eval
,
METH_VARARGS
},
{
"globaleval"
,
Tkapp_GlobalEval
,
METH_VARARGS
},
{
"evalfile"
,
Tkapp_EvalFile
,
METH_VARARGS
},
{
"record"
,
Tkapp_Record
,
METH_VARARGS
},
{
"adderrorinfo"
,
Tkapp_AddErrorInfo
,
METH_VARARGS
},
...
...
@@ -2716,7 +2629,6 @@ static PyMethodDef Tkapp_methods[] =
{
"exprboolean"
,
Tkapp_ExprBoolean
,
METH_VARARGS
},
{
"splitlist"
,
Tkapp_SplitList
,
METH_VARARGS
},
{
"split"
,
Tkapp_Split
,
METH_VARARGS
},
{
"merge"
,
Tkapp_Merge
,
METH_VARARGS
},
{
"createcommand"
,
Tkapp_CreateCommand
,
METH_VARARGS
},
{
"deletecommand"
,
Tkapp_DeleteCommand
,
METH_VARARGS
},
#ifdef HAVE_CREATEFILEHANDLER
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment