summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-02-01 16:49:21 (GMT)
committerGitHub <noreply@github.com>2018-02-01 16:49:21 (GMT)
commit97f1ca167385bafd9be5d226f61c33412fc081bf (patch)
tree49e0230e7e93865944f2ed9074d8e0d0f2a433b5 /Doc
parent12e7cd8a51956a5ce373aac692ae6366c5f86584 (diff)
downloadcpython-97f1ca167385bafd9be5d226f61c33412fc081bf.zip
cpython-97f1ca167385bafd9be5d226f61c33412fc081bf.tar.gz
cpython-97f1ca167385bafd9be5d226f61c33412fc081bf.tar.bz2
[3.8] bpo-31508: Remove support of arguments in tkinter.ttk.Treeview.selection. (GH-3651)
It was deprecated in 3.6.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/tkinter.ttk.rst11
-rw-r--r--Doc/whatsnew/3.8.rst8
2 files changed, 13 insertions, 6 deletions
diff --git a/Doc/library/tkinter.ttk.rst b/Doc/library/tkinter.ttk.rst
index debbc81..9c0c4cd 100644
--- a/Doc/library/tkinter.ttk.rst
+++ b/Doc/library/tkinter.ttk.rst
@@ -1094,14 +1094,13 @@ ttk.Treeview
the tree.
- .. method:: selection(selop=None, items=None)
+ .. method:: selection()
- If *selop* is not specified, returns selected items. Otherwise, it will
- act according to the following selection methods.
+ Returns a tuple of selected items.
- .. deprecated-removed:: 3.6 3.8
- Using ``selection()`` for changing the selection state is deprecated.
- Use the following selection methods instead.
+ .. versionchanged:: 3.8
+ ``selection()`` no longer takes arguments. For changing the selection
+ state use the following selection methods.
.. method:: selection_set(*items)
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 59f1883..8a3f9b0 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -113,3 +113,11 @@ This section lists previously described changes and other bugfixes
that may require changes to your code.
+Changes in the Python API
+-------------------------
+
+* The :meth:`~tkinter.ttk.Treeview.selection` method of the
+ :class:`tkinter.ttk.Treeview` class no longer takes arguments. Using it with
+ arguments for changing the selection was deprecated in Python 3.6. Use
+ specialized methods like :meth:`~tkinter.ttk.Treeview.selection_set` for
+ changing the selection. (Contributed by Serhiy Storchaka in :issue:`31508`.)