Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tkinter.ttk with Tcl/Tk 9.0 #120211

Closed
Tracked by #104568
serhiy-storchaka opened this issue Jun 7, 2024 · 0 comments
Closed
Tracked by #104568

Fix tkinter.ttk with Tcl/Tk 9.0 #120211

serhiy-storchaka opened this issue Jun 7, 2024 · 0 comments
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes topic-tkinter

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Jun 7, 2024

There are two issues in tkinter.ttk with Tcl/Tk 9.0.

  • Using the Variable methods trace_variable() and trace_vdelete(). They wrap deprecated Tcl commands which were removed in Tcl 9.0. New methods added in Add new methods to trace Tkinter variables #66313 should be used instead (added in Python 3.6 and supported in Tcl 8.4 or older).
  • Combobox.current() fails because the underlying Tk command returns now an empty string instead of -1 for empty combobox. It would be right to translate it to None, but -1 is more backward compatible. In future we can change this method to return None.

Linked PRs

@serhiy-storchaka serhiy-storchaka added topic-tkinter 3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes labels Jun 7, 2024
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Jun 7, 2024
* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
serhiy-storchaka added a commit that referenced this issue Jun 7, 2024
* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 7, 2024
* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
(cherry picked from commit d68a22e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 7, 2024
* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
(cherry picked from commit d68a22e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this issue Jun 7, 2024
)

* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
(cherry picked from commit d68a22e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
serhiy-storchaka added a commit that referenced this issue Jun 7, 2024
)

* Use new methods for tracing Tcl variable.
* Fix Combobox.current() for empty combobox.
(cherry picked from commit d68a22e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes 3.13 bugs and security fixes 3.14 new features, bugs and security fixes topic-tkinter
Projects
None yet
Development

No branches or pull requests

1 participant