mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (#3667)
Defer removing old behavior to 3.8. Document new feature of selection_set() and friends.
This commit is contained in:
parent
c247caf33f
commit
2fad102354
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