python / cpython

The Python programming language
https://www.python.org
Other
62.59k stars 30.04k forks source link

Tkinter: emit deprecation warning for trace_variable() etc #120220

Open serhiy-storchaka opened 3 months ago

serhiy-storchaka commented 3 months ago

The Variable methods trace_variable(), trace_vdelete() and trace_vinfo() wrap deprecated Tcl commands which were deleted in Tcl 9.0. Modern replacements trace_add(), trace_remove(), and trace_info() were added in Python 3.6 (#66313). They wrap Tcl commands supported since Tcl 8.4 or older, i.e. in all supported Tcl versions.

It is a time to add runtime warnings for the old methods.

Linked PRs

terryjreedy commented 3 months ago

I added the new methods to the opening statement for the benefit of users who arrive here.

terryjreedy commented 3 months ago

If it is possible to run tcl/tk 9.0 with 3.13 or even 3.14, this should be added to 3.13. It is a new feature, but a negative one.