Skip to content

Running test_ttk_guionly logs "test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed" warnings #75689

Closed

Description

@vstinner
BPO 31508
Nosy @vstinner, @serhiy-storchaka, @csabella
PRs
  • [3.8] bpo-31508: Remove support of arguments in tkinter.ttk.Treeview.selection. #3651
  • bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). #3667
  • [3.6] bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (GH-3667) #3719
  • 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 = None
    closed_at = <Date 2017-09-24.12:05:15.793>
    created_at = <Date 2017-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 = <Date 2018-02-01.16:49:29.694>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2018-02-01.16:49:29.694>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-09-24.12:05:15.793>
    closer = 'serhiy.storchaka'
    components = ['Tkinter']
    creation = <Date 2017-09-18.14:09:37.028>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31508
    keywords = ['patch']
    message_count = 12.0
    messages = ['302454', '302456', '302458', '302466', '302576', '302598', '302600', '302849', '302853', '302855', '302856', '311450']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'gpolo', 'serhiy.storchaka', 'cheryl.sabella']
    pr_nums = ['3651', '3667', '3719']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue31508'
    versions = ['Python 3.7']

    Activity

    1. vstinner commented on Sep 18, 2017

      @vstinner
      MemberAuthor

      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')
      .

    2. vstinner commented on Sep 18, 2017

      @vstinner
      MemberAuthor

      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

    3. serhiy-storchaka commented on Sep 18, 2017

      @serhiy-storchaka
      Member

      This is a reminder to me to remove a deprecated API (see bpo-27319).

    4. vstinner commented on Sep 18, 2017

      @vstinner
      MemberAuthor

      This is a reminder to me to remove a deprecated API (see bpo-27319).

      Running tests should not log deprecation warnings.

      Either remove the code, or make the warning quiet, no? :-)

    5. csabella commented on Sep 20, 2017

      @csabella
      Contributor

      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.

    6. serhiy-storchaka commented on Sep 20, 2017

      @serhiy-storchaka
      Member

      Thank you Cheryl. I'll open a separate issue.

    7. serhiy-storchaka commented on Sep 20, 2017

      @serhiy-storchaka
      Member

      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.

    8. serhiy-storchaka commented on Sep 24, 2017

      @serhiy-storchaka
      Member

      New changeset 2fad102 by Serhiy Storchaka in branch 'master':
      bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (bpo-3667)
      2fad102

    9. serhiy-storchaka commented on Sep 24, 2017

      @serhiy-storchaka
      Member

      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

    10. serhiy-storchaka commented on Sep 24, 2017

      @serhiy-storchaka
      Member

      Warnings are fixed in 3.7. They will reappear in 3.8.

    11. vstinner commented on Sep 24, 2017

      @vstinner
      MemberAuthor

      Thank you for the fix Serhiy!

    12. serhiy-storchaka commented on Feb 1, 2018

      @serhiy-storchaka
      Member

      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

    13. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions