gh-140494: require that Tcl is built with thread support#141241
gh-140494: require that Tcl is built with thread support#141241mdehoon wants to merge 8 commits into
Conversation
|
Note: The compile-time test for |
|
This PR is stale because it has been open for 30 days with no activity. |
| { | ||
| Tcl_Interp* interp; | ||
| Tcl_Obj* threaded; | ||
| interp = Tcl_CreateInterp(); |
There was a problem hiding this comment.
Is it fine to create an interpreter at import time? The application may have nothing to do with Tcl, just importing tkinter for introspection.
There was a problem hiding this comment.
The alternative is to have the check in Tkapp_New (and potentially any other Tcl functions that get added to _tkinter in the future).
I understand your concern, but with the check at import time, we are sure that the check is performed, and that it is run only once.
There was a problem hiding this comment.
It is fine to check in Tkapp_New. Any other function will likely require an interpreter created in Tkapp_New, or threading will not matter for them. And in the future non-threaded Tcl/Tk will be in the past.
There was a problem hiding this comment.
OK. I have modified the PR and moved the check to Tkapp_New.
Documentation build overview
|
…nd the tcl_platform(threaded) variable has been removed
…ported in the CPython repo.
|
Please refrain from frequent pushes. Only push when you are ready, preferably in a single commit. |
My apologies, my local repository somehow got out of sync with the remote one. |
This PR modifies
_tkinter.cto require that Tcl is built with thread support. It also modifies the documentation fileDoc/library/tkinter.rstaccordingly.Note that this only affects Tcl 8.x, as Tcl 9.x no longer has the
--disable-threadsbuild option and is always thread-enabled.📚 Documentation preview 📚: https://cpython-previews--141241.org.readthedocs.build/