Skip to content

gh-127802: Schedule removal of legacy tkinter variable trace methods in 3.17#152012

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:tkinter-trace-removal-3.17
Jun 25, 2026
Merged

gh-127802: Schedule removal of legacy tkinter variable trace methods in 3.17#152012
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:tkinter-trace-removal-3.17

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 23, 2026

Copy link
Copy Markdown
Member

The :class:!tkinter.Variable methods trace_variable(), trace(), trace_vdelete() and trace_vinfo() have been deprecated since Python 3.14 (:gh:120220) and emit a DeprecationWarning. They wrap the Tcl trace variable/vdelete/vinfo commands, which were removed in Tcl 9.0, so they already raise TclError with Tk 9.

This schedules their removal for Python 3.17: the deprecation warnings now state the removal version, and a pending-removal-in-3.17 entry is added (it is included in the 3.16 "What's New" pending-removal section).

The methods are intentionally not rewired to the trace_add()/trace_remove()/trace_info() API; users should migrate to those.

🤖 Generated with Claude Code

…thods in 3.17

The tkinter.Variable methods trace_variable(), trace(), trace_vdelete()
and trace_vinfo(), deprecated since Python 3.14, are now scheduled for
removal in Python 3.17.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@read-the-docs-community

Copy link
Copy Markdown

@serhiy-storchaka

Copy link
Copy Markdown
Member Author

@hugovk, can we land this in 3.15? These methods were deprecated in 3.14 without clear removal term, but they fail on Tk 9.0, which is now bundled in 3.15 on Windows and optionally on macOS.

@hugovk

hugovk commented Jun 25, 2026

Copy link
Copy Markdown
Member

Yes, that's okay.

@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 25, 2026
@serhiy-storchaka serhiy-storchaka merged commit deeae2a into python:main Jun 25, 2026
55 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@serhiy-storchaka serhiy-storchaka deleted the tkinter-trace-removal-3.17 branch June 25, 2026 12:05
@bedevere-app

bedevere-app Bot commented Jun 25, 2026

Copy link
Copy Markdown

GH-152186 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 25, 2026
serhiy-storchaka added a commit that referenced this pull request Jun 25, 2026
…ethods in 3.17 (GH-152012) (GH-152186)

The tkinter.Variable methods trace_variable(), trace(), trace_vdelete()
and trace_vinfo(), deprecated since Python 3.14, are now scheduled for
removal in Python 3.17.
(cherry picked from commit deeae2a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants