GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-140494: require that Tcl is built with thread support by mdehoon · Pull Request #141241 · python/cpython

Conversation

@mdehoon

@mdehoon mdehoon commented Nov 8, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This PR modifies _tkinter.c to require that Tcl is built with thread support. It also modifies the documentation file Doc/library/tkinter.rst accordingly.

Note that this only affects Tcl 8.x, as Tcl 9.x no longer has the --disable-threads build option and is always thread-enabled.

  • Issue: Dead code in tkinter #140494

📚 Documentation preview 📚: https://cpython-previews--141241.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

moritajavier239-rgb reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bedevere-app bedevere-app Bot added the awaiting review label Nov 8, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Nov 8, 2025
Dead code in tkinter #140494
Open
@mdehoon

mdehoon commented Nov 8, 2025

Copy link
Copy Markdown
Contributor Author

Note: The compile-time test for TCL_MAJOR_VERSION < 9 is needed because the macOS tests use Tcl from homebrew, which provides Tcl 9.0.2.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 1, 2026
serhiy-storchaka
serhiy-storchaka reviewed Jul 17, 2026
View reviewed changes
Comment thread Modules/_tkinter.c Outdated
{
Tcl_Interp* interp;
Tcl_Obj* threaded;
interp = Tcl_CreateInterp();

@serhiy-storchaka serhiy-storchaka Jul 17, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Is it fine to create an interpreter at import time? The application may have nothing to do with Tcl, just importing tkinter for introspection.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

moritajavier239-rgb reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@mdehoon mdehoon Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

moritajavier239-rgb reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@serhiy-storchaka serhiy-storchaka Jul 17, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

moritajavier239-rgb reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@mdehoon mdehoon Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

OK. I have modified the PR and moved the check to Tkapp_New.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

moritajavier239-rgb reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@read-the-docs-community

read-the-docs-community Bot commented Jul 18, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33643094 | 📁 Comparing 84f5c28 against main (16d0c89)

  🔍 Preview build  

2 files changed
± library/tkinter.html
± whatsnew/changelog.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Michiel Jan Laurens de Hoon and others added 6 commits July 18, 2026 13:01
Michiel Jan Laurens de Hoon Michiel Jan Laurens de Hoon
require that Tcl is built with thread support
53a3669
Michiel Jan Laurens de Hoon Michiel Jan Laurens de Hoon
don't check for thread support on Tcl 9.x, as it is always threaded a…
8d199d4
…nd the tcl_platform(threaded) variable has been removed
@blurb-it Michiel Jan Laurens de Hoon
📜🤖 Added by blurb_it.
da2785d
Michiel Jan Laurens de Hoon Michiel Jan Laurens de Hoon
Check if Tcl is threaded when creating a tkapp
f73ddd2
Michiel Jan Laurens de Hoon Michiel Jan Laurens de Hoon
remove remaining reference to threaded
1cb7f4b
Michiel Jan Laurens de Hoon Michiel Jan Laurens de Hoon
remove static, as non-constant global variables are generally not sup…
3e998fd
…ported in the CPython repo.
@mdehoon
mdehoon force-pushed the tkinter_threads branch from 703fcfe to 3e998fd Compare July 18, 2026 04:06
Michiel Jan Laurens de Hoon and others added 2 commits July 18, 2026 13:12
Michiel Jan Laurens de Hoon Michiel Jan Laurens de Hoon
remove v->threaded, as it's a local variable now
6899a2c
@mdehoon
Merge branch 'main' into tkinter_threads
84f5c28
@serhiy-storchaka

serhiy-storchaka commented Jul 18, 2026

Copy link
Copy Markdown
Member

Please refrain from frequent pushes. Only push when you are ready, preferably in a single commit.

moritajavier239-rgb reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdehoon

mdehoon commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

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.
It's done now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jul 24, 2026
@github-actions

github-actions Bot commented Oct 26, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Oct 26, 2026
@serhiy-storchaka serhiy-storchaka removed the stale Stale PR or inactive for long period of time. label Oct 26, 2026
@serhiy-storchaka

serhiy-storchaka commented Oct 26, 2026

Copy link
Copy Markdown
Member

It is not stale, it waits for it's time.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mdehoon @serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.