[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:
Miss Islington (bot) 2017-09-24 05:03:48 -07:00 committed by Serhiy Storchaka
parent 018e6b9f69
commit e31eca45e5
3 changed files with 23 additions and 7 deletions

View file

@ -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: