GeezerVison is showing github.com — Tkinter: Tk 8.7 quotes pathnames in certain error messages · Issue #104494 · python/cpython
Tkinter: Tk 8.7 quotes pathnames in certain error messages #104494DescriptionTk 8.7 (as of https://core.tcl-lang.org/tk/info/2991150c09f6) adds quotes around window pathnames in a few error messages, including those triggered by two Tkinter tests, causing them to fail:
======================================================================
FAIL: test_pack_configure_in (test.test_tkinter.test_geometry_managers.PackTest.test_pack_configure_in)
----------------------------------------------------------------------
_tkinter.TclError: can't pack ".pack.a" inside itself
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/user/git/cpython/Lib/test/test_tkinter/test_geometry_managers.py", line 111, in test_pack_configure_in
with self.assertRaisesRegex(TclError,
AssertionError: "can't pack .pack.a inside itself" does not match "can't pack ".pack.a" inside itself"
======================================================================
FAIL: test_place_configure_in (test.test_tkinter.test_geometry_managers.PlaceTest.test_place_configure_in)
----------------------------------------------------------------------
_tkinter.TclError: can't place ".!toplevel2.!frame2" relative to itself
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/user/git/cpython/Lib/test/test_tkinter/test_geometry_managers.py", line 295, in test_place_configure_in
with self.assertRaisesRegex(TclError, "can't place %s relative to "
AssertionError: "can't place \.!toplevel2\.!frame2 relative to itself" does not match "can't place ".!toplevel2.!frame2" relative to itself"
Linked PRs
Activitychanged the title [-]Tkinter: Tk 8.7 quotes pathnames in error messages[/-] [+]Tkinter: Tk 8.7 quotes pathnames in certain error messages[/+] on May 15, 2023terryjreedy commented on May 15, 2023 I have asked on the triager-coredev discord whether these prevent-future-bug issues should be considered enhancements or bugfixes (and eligible to be backported). Even if we decide not an issue for 3.11, this will matter soon for 3.12, when 3.12.0b1 is released (a week?) and 'main' becomes the future 3.13.0. erlend-aasland commented on May 15, 2023 Adjusting tests for Tk 8.7 compatibility is fine. This happens for other extension modules with third party deps as well (for example the sqlite3 module). I'd be fine to backport the test adjustments to 3.11. (3.10 is out of the question, since it only accepts security fixes). terryjreedy commented on May 15, 2023 Some of the adjustments will be to _tkinter or tkinter code, not tests. Example in
#104496. terryjreedy commented on May 16, 2023 I now agree that we should backport all tests. See new tracking issue #104568. Will immediately backport the PR here. Reacted by Erlend E. Aasland
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|