Uh oh!
There was an error while loading. Please reload this page.
gh-128846: Add check_tk_version function to test.support - #128880
gh-128846: Add check_tk_version function to test.support#128880smontanaro wants to merge 0 commit into
Conversation
smontanaro
commented
Jan 15, 2025
I should mention that credit for the version extraction code snippet goes to @zanieb. |
zanieb
commented
Jan 15, 2025
Thanks :) as a note... you can use the simpler |
smontanaro
commented
Jan 15, 2025
I have a vague recollection of Tk changing in an incompatible (for Python, at least) when the patch/micro version was incremented. Though I might well be misremembering, I think it's probably better to be explicit in this case. |
smontanaro
commented
Jan 15, 2025
Also, it occurs to me that a check like this might actually be more useful for previously released versions of Python, as support for a particular max version of Tcl/Tk is likely to freeze after release. |
I've been burned more than once I think about mysterious test failures when my local version of Tk is newer than what's supported in Python code. This PR is an attempt to make it clearer for dummies like me why.
A couple things:
test_ttk_textonly. Belt and suspenders, I suppose.check_tk_version()function. That's maybe not the best place for it. Perhaps it should be a global intest/support/__init__.pyinstead? I didn't want to replicate it in various places.