mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-41730: Show deprecation warnings for tkinter.tix (GH-22186)
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com> Co-authored-by: Zachary Ware <zach@python.org>
This commit is contained in:
parent
adcd220556
commit
4a2d98a1e9
3 changed files with 19 additions and 6 deletions
|
@ -21,13 +21,20 @@
|
|||
# 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
|
||||
|
||||
import _tkinter # If this fails your Python may not be configured for Tk
|
||||
warnings.warn(
|
||||
'The Tix Tk extension is unmaintained, and the tkinter.tix wrapper module'
|
||||
' is deprecated in favor of tkinter.ttk',
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
|
||||
# Some more constants (for consistency with Tkinter)
|
||||
WINDOW = 'window'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue