This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_tk test_widgets.ScaleTest fails with Tk 8.6.10
Type: Stage: resolved
Components: Tests, Tkinter Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: epaine, felixonmars, gpolo, lukasz.langa, miss-islington, ned.deily, serhiy.storchaka, terry.reedy
Priority: critical Keywords: patch

Created on 2020-07-15 19:12 by felixonmars, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 21715 merged epaine, 2020-08-03 13:01
PR 22596 merged miss-islington, 2020-10-08 13:30
PR 22597 merged miss-islington, 2020-10-08 16:15
Messages (11)
msg373710 - (view) Author: Felix Yan (felixonmars) * Date: 2020-07-15 19:12
test_from (tkinter.test.test_tkinter.test_widgets.ScaleTest) is currently failing on Arch Linux, and at least another place: https://python-build-standalone.readthedocs.io/en/latest/status.html

The error looks like:

======================================================================
FAIL: test_from (tkinter.test.test_tkinter.test_widgets.ScaleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.8/tkinter/test/test_tkinter/test_widgets.py", line 939, in test_from
    self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=float_round)
  File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 106, in checkFloatParam
    self.checkParam(widget, name, value, conv=conv, **kwargs)
  File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 64, in checkParam
    self.assertEqual2(widget.cget(name), expected, eq=eq)
  File "/usr/lib/python3.8/tkinter/test/widget_tests.py", line 47, in assertEqual2
    self.assertEqual(actual, expected, msg)
AssertionError: 14.9 != 15.0

It's the only failure in the current Python 3.8.4 release's test suite here. Also adding Python 3.9 and 3.10 as I am able to reproduce it on master too.
msg373767 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-07-16 20:14
What version of Tk is being used?  It's in the output from:
  python3 -m test.pythoninfo
or however you invoke python.
msg373768 - (view) Author: Felix Yan (felixonmars) * Date: 2020-07-16 20:33
tkinter.TCL_VERSION: 8.6
tkinter.TK_VERSION: 8.6
tkinter.info_patchlevel: 8.6.10

It's always reproducible in either a real desktop or Xvfb with arbitrary resolution etc as far as I have tested.
msg373780 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-07-16 22:26
I can reproduce that test failure with Tk 8.6.10 on macOS, along with a few others. I believe various small things have changed in Tk somewhere between 8.6.8 and 8.6.10 in ways that affect some of the Python Tk gui tests, like test_tk and test_ttk_guionly. Some of our tests are pretty brittle with regard to Tk behavior; they captured how a particular version of Tk worked without necessarily a guarantee on the Tk side that the observed behavior wouldn't change. Someone needs to go through and make the tests work with all recent versions of Tk 8.6.x and someone should also get at least some buildbots running with 8.6.10 and really running the gui tests.
msg374531 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-07-28 21:18
This issue should be fixed for upcoming releases. Nosying Łukasz for consideration of "release blocker" status.
msg374733 - (view) Author: E. Paine (epaine) * Date: 2020-08-03 10:17
+1 this issue. I have encountered this problem lots when testing patches and almost always just end up deleting the test_from method to get test_tk to pass. I am not sure of a solution, though, as we *need* to keep test compatibility with Tk 8.6.8 while (preferably) being able to recognise when the value is wrong for the given version. I hope to take a more in-depth look at the problem and possible solutions (I want to avoid, if possible, either checking the Tk version or allowing both 14.9 & 15.0 values to pass the test).
msg374741 - (view) Author: E. Paine (epaine) * Date: 2020-08-03 16:56
For reference, I have opened https://core.tcl-lang.org/tk/tktview?name=81c3ef93148d17ff280d9a0b4c4edfce453b972f to report this to the Tk team and ask if this change in behaviour is intended.
msg377509 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-09-25 21:15
Fixing this test bug is required to upgrade tk on Windows.  #39107 and PR 22405.

E. Paine reported on the PR 21715 that this change is intentional and here to stay.  I wondered the same; thank you for asking.
msg378250 - (view) Author: miss-islington (miss-islington) Date: 2020-10-08 13:30
New changeset aecf036738a404371303e770f4ce4fd9f7d43de7 by E-Paine in branch 'master':
bpo-41306: Allow scale value to not be rounded (GH-21715)
https://github.com/python/cpython/commit/aecf036738a404371303e770f4ce4fd9f7d43de7
msg378254 - (view) Author: miss-islington (miss-islington) Date: 2020-10-08 16:15
New changeset 3d103e06951324680c587d4fe1135f06367c9d3d by Miss Skeleton (bot) in branch '3.8':
bpo-41306: Allow scale value to not be rounded (GH-21715)
https://github.com/python/cpython/commit/3d103e06951324680c587d4fe1135f06367c9d3d
msg378257 - (view) Author: miss-islington (miss-islington) Date: 2020-10-08 16:51
New changeset 15e091f63f12b659ad17563a4ce7f5188aceae0a by Miss Skeleton (bot) in branch '3.9':
bpo-41306: Allow scale value to not be rounded (GH-21715)
https://github.com/python/cpython/commit/15e091f63f12b659ad17563a4ce7f5188aceae0a
History
Date User Action Args
2022-04-11 14:59:33adminsetgithub: 85478
2020-10-08 17:16:27pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-10-08 16:51:01miss-islingtonsetmessages: + msg378257
2020-10-08 16:15:22miss-islingtonsetpull_requests: + pull_request21585
2020-10-08 16:15:02miss-islingtonsetmessages: + msg378254
2020-10-08 13:30:31miss-islingtonsetpull_requests: + pull_request21584
2020-10-08 13:30:24miss-islingtonsetnosy: + miss-islington
messages: + msg378250
2020-09-25 21:15:23terry.reedysetnosy: + terry.reedy
messages: + msg377509
2020-08-03 16:56:53epainesetmessages: + msg374741
2020-08-03 13:01:45epainesetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request20859
2020-08-03 10:17:45epainesetnosy: + epaine
messages: + msg374733
components: + Tkinter
2020-07-28 21:18:45ned.deilysetpriority: normal -> critical
nosy: + lukasz.langa
messages: + msg374531

2020-07-28 21:15:27ned.deilylinkissue41405 superseder
2020-07-16 22:26:49ned.deilysetnosy: + gpolo, serhiy.storchaka
title: test_tk failure on Arch Linux -> test_tk test_widgets.ScaleTest fails with Tk 8.6.10
messages: + msg373780

stage: needs patch
2020-07-16 20:33:29felixonmarssetmessages: + msg373768
2020-07-16 20:14:59ned.deilysetnosy: + ned.deily
messages: + msg373767
2020-07-15 19:12:33felixonmarscreate