mirror of
https://github.com/python/cpython.git
synced 2025-10-06 07:02:33 +00:00
[3.6] bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (GH-3667) (#3719)
Defer removing old behavior to 3.8.
Document new feature of selection_set() and friends.
(cherry picked from commit 2fad102354
)
This commit is contained in:
parent
018e6b9f69
commit
e31eca45e5
3 changed files with 23 additions and 7 deletions
|
@ -1404,13 +1404,13 @@ class Treeview(Widget, tkinter.XView, tkinter.YView):
|
|||
import warnings
|
||||
warnings.warn(
|
||||
"The selop=None argument of selection() is deprecated "
|
||||
"and will be removed in Python 3.7",
|
||||
"and will be removed in Python 3.8",
|
||||
DeprecationWarning, 3)
|
||||
elif selop in ('set', 'add', 'remove', 'toggle'):
|
||||
import warnings
|
||||
warnings.warn(
|
||||
"The selop argument of selection() is deprecated "
|
||||
"and will be removed in Python 3.7, "
|
||||
"and will be removed in Python 3.8, "
|
||||
"use selection_%s() instead" % (selop,),
|
||||
DeprecationWarning, 3)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue