Skip to content

test_tk.test_configure_type() fails with Tcl/Tk 8.6.11 #89599

Closed

Description

@vstinner
BPO 45436
Nosy @terryjreedy, @ned-deily, @ambv, @zware, @serhiy-storchaka, @miss-islington, @E-Paine
PRs
  • bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ #29077
  • [3.10] bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) #29080
  • [3.9] bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) #29081
  • [3.8] bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077) #29093
  • bpo-45502: Fix test_shelve #29003
  • bpo-45229: Make doctest tests discoverable #28986
  • 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 2022-02-08.15:57:55.636>
    created_at = <Date 2021-10-11.20:27:07.569>
    labels = ['type-bug', 'expert-tkinter', '3.9', '3.10', '3.11', 'tests']
    title = 'test_tk.test_configure_type() fails with Tcl/Tk 8.6.11'
    updated_at = <Date 2022-02-08.15:57:55.635>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2022-02-08.15:57:55.635>
    actor = 'zach.ware'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-02-08.15:57:55.636>
    closer = 'zach.ware'
    components = ['Tests', 'Tkinter']
    creation = <Date 2021-10-11.20:27:07.569>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45436
    keywords = ['patch']
    message_count = 22.0
    messages = ['403678', '403680', '403683', '404338', '404352', '404385', '404388', '404453', '404454', '404460', '404465', '404471', '404645', '404653', '404862', '404963', '404968', '404969', '407818', '407855', '407927', '412845']
    nosy_count = 8.0
    nosy_names = ['terry.reedy', 'gpolo', 'ned.deily', 'lukasz.langa', 'zach.ware', 'serhiy.storchaka', 'miss-islington', 'epaine']
    pr_nums = ['29077', '29080', '29081', '29093', '29003', '28986']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45436'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Activity

    1. vstinner commented on Oct 11, 2021

      @vstinner
      MemberAuthor

      x86 Gentoo Non-Debug with X 3.x:
      https://buildbot.python.org/all/#/builders/58/builds/891

      test.pythoninfo:

      tkinter.TCL_VERSION: 8.6
      tkinter.TK_VERSION: 8.6
      tkinter.info_patchlevel: 8.6.11

      2 tests failed:
      test_tk test_ttk_guionly

      ======================================================================
      FAIL: test_configure_type (tkinter.test.test_tkinter.test_widgets.MenuTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_tkinter/test_widgets.py", line 1244, in test_configure_type
          self.checkEnumParam(widget, 'type',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
          self.checkInvalidParam(widget, name, '',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
          with self.assertRaises(tkinter.TclError) as cm:
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError: TclError not raised

      ======================================================================
      FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.ButtonTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
          self.checkEnumParam(widget, 'compound',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
          self.checkInvalidParam(widget, name, '',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
          with self.assertRaises(tkinter.TclError) as cm:
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError: TclError not raised

      ======================================================================
      FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.CheckbuttonTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
          self.checkEnumParam(widget, 'compound',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
          self.checkInvalidParam(widget, name, '',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
          with self.assertRaises(tkinter.TclError) as cm:
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError: TclError not raised

      ======================================================================
      FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.LabelTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
          self.checkEnumParam(widget, 'compound',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
          self.checkInvalidParam(widget, name, '',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
          with self.assertRaises(tkinter.TclError) as cm:
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError: TclError not raised

      ======================================================================
      FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.MenubuttonTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
          self.checkEnumParam(widget, 'compound',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
          self.checkInvalidParam(widget, name, '',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
          with self.assertRaises(tkinter.TclError) as cm:
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError: TclError not raised

      ======================================================================
      FAIL: test_configure_compound (tkinter.test.test_ttk.test_widgets.RadiobuttonTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_configure_compound
          self.checkEnumParam(widget, 'compound',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 151, in checkEnumParam
          self.checkInvalidParam(widget, name, '',
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/tkinter/test/widget_tests.py", line 73, in checkInvalidParam
          with self.assertRaises(tkinter.TclError) as cm:
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AssertionError: TclError not raised
    2. changed the title [-]test_configure_type() failed on[/-] [+]test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x[/+] on Oct 11, 2021
    3. changed the title [-]test_configure_type() failed on[/-] [+]test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x[/+] on Oct 11, 2021
    4. vstinner commented on Oct 11, 2021

      @vstinner
      MemberAuthor

      See also bpo-43139: test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1.

    5. vstinner commented on Oct 11, 2021

      @vstinner
      MemberAuthor

      2 tests failed:test_tk test_ttk_guionly

      They also failed on:

      • x86 Gentoo Non-Debug with X 3.9
      • x86 Gentoo Non-Debug with X 3.10
    6. terryjreedy commented on Oct 19, 2021

      @terryjreedy
      Member

      EP, do you have any insight into these issues? Why does 8.6.11 result in test failures? Bug in our test or in tk?

    7. changed the title [-]test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x[/-] [+]test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x with Tcl/Tk 8.6.11[/+] on Oct 19, 2021
    8. changed the title [-]test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x[/-] [+]test_tk.test_configure_type() failed on x86 Gentoo Non-Debug with X 3.x with Tcl/Tk 8.6.11[/+] on Oct 19, 2021
    9. ned-deily commented on Oct 19, 2021

      @ned-deily
      Member

      There are similar test failures on macOS with the current Tk 8.6.11.1 on both 3.10 and 3.11.

    10. 13 remaining items

    11. ambv commented on Oct 21, 2021

      @ambv
      Contributor

      Thanks for the investigation, E. Paine. So I'm keeping this open then.

    12. zware commented on Oct 21, 2021

      @zware
      Member

      I'm not sure there's much utility to keeping this issue open: the test failures are fixed with a mild but not unprecedented weakening of the tests, and Tcl/Tk 8.6.11 is in the wild and will remain there, so our tests are likely to need to continue handling its behavior (buggy or not) in perpetuity.

      By all means, please continue pursuing the change with Tcl/Tk :). I'm just not sure what else there is for us to do here.

    13. E-Paine commented on Oct 23, 2021

      E-Painemannequin
      Mannequin

      It turns out the test_configure_compound change was intentional (https://core.tcl-lang.org/tk/tktview/46c2f088) and an empty string will use the value given by the style ("If set to the empty string (the default)..." https://www.tcl.tk/man/tcl/TkCmd/ttk_widget.html#M-compound).

    14. zware commented on Oct 25, 2021

      @zware
      Member

      Thanks for tracking that down! Any word on the tk Menu type parameter change?

    15. E-Paine commented on Oct 25, 2021

      E-Painemannequin
      Mannequin

      Any word on the tk Menu type parameter change?

      I haven't submitted a bug report yet and want to do a little more research before I do so (the Tcl ticket system is quite difficult to search)

    16. serhiy-storchaka commented on Oct 25, 2021

      @serhiy-storchaka
      Member

      Are there changes in handling empty values for other options? If yes, we perhaps need to add version-dependent tests for empty values instead of just skipping this case.

    17. E-Paine commented on Dec 6, 2021

      E-Painemannequin
      Mannequin

      Any word on the tk Menu type parameter change?

      I'll admit to having completely forgot about this issue and not raising it with the Tk team. Manually trying this case on Tk 8.6.12 segfaults, so I really need to raise it. To reproduce the segfault, simply run the top command in Python, or the bottom command in Wish:

      tk.Menu(type="")
      menu .m -type {}
    18. terryjreedy commented on Dec 6, 2021

      @terryjreedy
      Member
      import tkinter as tk
      tk.Menu(type='')

      crashes on current Windows 3.9-11 with 8.6.12

    19. E-Paine commented on Dec 7, 2021

      E-Painemannequin
      Mannequin

      Fix merged upstream: https://core.tcl-lang.org/tk/tktview/be8f5b9f
      Can issue be closed now?

    20. zware commented on Feb 8, 2022

      @zware
      Member

      Can issue be closed now?

      I think so; if others disagree they can reopen it :)

    21. added
      type-bugAn unexpected behavior, bug, or error
      on Feb 8, 2022
    22. added
      type-bugAn unexpected behavior, bug, or error
      on Feb 8, 2022
    23. 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

      Labels

      3.10 (EOL)end of life3.11only security fixes3.9 (EOL)end of lifetestsTests in the Lib/test dirtopic-tkintertype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions