Skip to content

Conversation

@culler
Copy link
Contributor

@culler culler commented Sep 17, 2024

This PR updates tkinter, ttk, test.test_tkinter and test.test_ttk to make them work and pass tests when built against either TclTk 8.6.15, which was released today, or TclTk 9.0.0 which currently has a release candidate and will be released soon. The changes to the tests include some re-organization to make it easier to accommodate expected development of Tk 9, particularly with respect to the new TclObject of type "pixels" used in Tk 9 for options whose values represent screen distances.

Please also see the discussion on PR #124112.

Note that, unlike #124112, this PR targets Python 3.14.

@bedevere-app
Copy link

bedevere-app bot commented Sep 17, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app

This comment was marked as duplicate.

@culler culler requested a review from a team as a code owner September 19, 2024 16:11
Copy link
Member

@zooba zooba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why your generated files look like they're completely changed? It is line endings being bad? (I believe our regen scripts assume you're using autocrlf on Windows.)

@culler
Copy link
Contributor Author

culler commented Sep 19, 2024

Do you know why your generated files look like they're completely changed? It is line endings being bad? (I believe our regen scripts assume you're using autocrlf on Windows.)

I have no idea. I committed those by mistake, since I am used to using git commit -a. It has something to do with Windows - those files were not changed by other platforms.

I think I have now restored the autogenerated files that I committed by mistake.

Copy link
Member

@zware zware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! I have some comments that are mostly style nits, and I think we may want to hold off on the changes to PCbuild/. I don't think we'll be able to move the Windows builds for <=3.13 to Tcl/Tk 9 (at least not immediately), so it will make backporting the other changes easier to leave the 3.14 PCbuild/ updates to a separate PR.

Thanks!

@culler
Copy link
Contributor Author

culler commented Sep 20, 2024

I think I have now addressed all issues raised in the comments. Is there anything else that is needed?

@culler culler requested a review from zware September 20, 2024 16:38
@zooba
Copy link
Member

zooba commented Sep 23, 2024

We don't want example files in the build directory. To "save" the changes for later, they could either be a draft PR, comments in the file (not preferred), or you could add the changes with Condition="$(TclMajorVersion) == '9'" checks so that they automatically apply when building against 9.0 (preferred).1

Footnotes

  1. Number comparisons are a bit wonky in MSBuild, so usually just best to pick the most sensible default. In this case, it's probably actually to check $(TclMajorVersion) == '8' for the old behaviour, so that when 10.0 comes out it'll get the newer behaviours.

@culler
Copy link
Contributor Author

culler commented Sep 23, 2024

We don't want example files in the build directory. To "save" the changes for later, they could either be a draft PR, comments in the file (not preferred), or you could add the changes with Condition="$(TclMajorVersion) == '9'" checks so that they automatically apply when building against 9.0 (preferred).1

Footnotes

1. Number comparisons are a bit wonky in MSBuild, so usually just best to pick the most sensible default. In this case, it's probably actually to check `$(TclMajorVersion) == '8'` for the old behaviour, so that when 10.0 comes out it'll get the newer behaviours. [↩](#user-content-fnref-1-9d9cf4f3af8602fa729bad031ef1ba2c)

Sure. I will attempt to modify _tkinter.vcxproj to allow building against either 8.6.14 or 9.0.0. (Note that 8.6.15 has been released, but the binaries are not available to get_externals.bat yet.)