Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Lib/tkinter/tix.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
# inheritance of base classes.
#
# As a result after creating a 'w = StdButtonBox', I can write
# w.ok['text'] = 'Who Cares'
# or w.ok['bg'] = w['bg']
# w.ok['text'] = 'Who Cares'
# or w.ok['bg'] = w['bg']
Comment thread
wyz23x2 marked this conversation as resolved.
Resolved
# or even w.ok.invoke()
# etc.
#
# Compare the demo tixwidgets.py to the original Tcl program and you will
# appreciate the advantages.
#
# NOTE: This module is deprecated since Python 3.6.

import os
import warnings
import tkinter
from tkinter import *
from tkinter import _cnfmerge
Expand Down Expand Up @@ -63,6 +65,10 @@
TCL_IDLE_EVENTS = 1 << 5
TCL_ALL_EVENTS = 0

# Deprecation warning
Comment thread
wyz23x2 marked this conversation as resolved.
Resolved
warnings.warn('the tkinter.tix module is deprecated in favour of tkinter.ttk and is set '
'to be removed in the near-future', DeprecationWarning, stacklevel=2)
Comment thread
wyz23x2 marked this conversation as resolved.
Resolved

# BEWARE - this is implemented by copying some code from the Widget class
# in Tkinter (to override Widget initialization) and is therefore
# liable to break.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The ``tkinter.tix`` module has been deprecated since Python 3.6. Warn a ``DeprecationWarning`` when importing it.
Comment thread
wyz23x2 marked this conversation as resolved.
Resolved