You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running test_ttk_guionly logs "test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed" warnings #75689
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-09-24.12:05:15.793>created_at=<Date2017-09-18.14:09:37.028>labels= ['3.7', 'expert-tkinter']
title='Running test_ttk_guionly logs "test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed" warnings'updated_at=<Date2018-02-01.16:49:29.694>user='https://github.com/vstinner'
0:33:11 load avg: 4.82 [ 44/405/1] test_ttk_guionly passed -- running: test_subprocess (504 sec)
/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
beginning 6 repetitions
123456
/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
.
test_selection (tkinter.test.test_ttk.test_widgets.TreeviewTest) ... /home/haypo/prog/python/master/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
ok
In tkinter __init__.py, there's messages on trace_variable and other trace functions about adding a deprecation warning. I didn't know if you intended to make those changes as well.
Oh, I missed that the selection() method with its current behavior is documented in the module documentation. It isn't undocumented implementation detail. This raises a bar for removing higher.
I think it is better to defer removing to 3.8 or later. Instead we should document the deprecation.
New changeset 97f1ca1 by Serhiy Storchaka in branch 'master':
[3.8] bpo-31508: Remove support of arguments in tkinter.ttk.Treeview.selection. (GH-3651) 97f1ca1
Activity
vstinner commentedon Sep 18, 2017
0:33:11 load avg: 4.82 [ 44/405/1] test_ttk_guionly passed -- running: test_subprocess (504 sec)
/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
beginning 6 repetitions
123456
/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
./buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
.
vstinner commentedon Sep 18, 2017
I saw these warnings on:
http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.x/builds/96/steps/test/logs/stdio
Extract of the pythoninfo:
tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.6
--
I can reproduce the warning locally:
test_selection (tkinter.test.test_ttk.test_widgets.TreeviewTest) ... /home/haypo/prog/python/master/Lib/tkinter/test/test_ttk/test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed
'Deprecated API of Treeview.selection() should be removed')
ok
serhiy-storchaka commentedon Sep 18, 2017
This is a reminder to me to remove a deprecated API (see bpo-27319).
vstinner commentedon Sep 18, 2017
Running tests should not log deprecation warnings.
Either remove the code, or make the warning quiet, no? :-)
csabella commentedon Sep 20, 2017
Serhiy,
In tkinter __init__.py, there's messages on trace_variable and other trace functions about adding a deprecation warning. I didn't know if you intended to make those changes as well.
serhiy-storchaka commentedon Sep 20, 2017
Thank you Cheryl. I'll open a separate issue.
serhiy-storchaka commentedon Sep 20, 2017
Oh, I missed that the selection() method with its current behavior is documented in the module documentation. It isn't undocumented implementation detail. This raises a bar for removing higher.
I think it is better to defer removing to 3.8 or later. Instead we should document the deprecation.
serhiy-storchaka commentedon Sep 24, 2017
New changeset 2fad102 by Serhiy Storchaka in branch 'master':
bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (bpo-3667)
2fad102
serhiy-storchaka commentedon Sep 24, 2017
New changeset e31eca4 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
[3.6] bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (GH-3667) (bpo-3719)
e31eca4
serhiy-storchaka commentedon Sep 24, 2017
Warnings are fixed in 3.7. They will reappear in 3.8.
vstinner commentedon Sep 24, 2017
Thank you for the fix Serhiy!
serhiy-storchaka commentedon Feb 1, 2018
New changeset 97f1ca1 by Serhiy Storchaka in branch 'master':
[3.8] bpo-31508: Remove support of arguments in tkinter.ttk.Treeview.selection. (GH-3651)
97f1ca1