classification
Title: Show deprecation warnings for tkinter.tix
Type: behavior Stage: patch review
Components: Tkinter Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: epaine, gpolo, serhiy.storchaka, wyz23x2, xtreak, zach.ware
Priority: normal Keywords: patch

Created on 2020-09-06 03:54 by wyz23x2, last changed 2020-09-13 06:04 by wyz23x2.

Pull Requests
URL Status Linked Edit
PR 22186 open wyz23x2, 2020-09-10 11:26
Messages (10)
msg376455 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-09-06 03:54
The tkinter.tix module was deprecated since Python 3.6, but nether DeprecationWarning nor PendingDeprecationWarning is warned. It should show a message and removal might be scheduled for 3.11/3.12.
msg376459 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-09-06 07:52
The removal was suggested before but not merged in https://bugs.python.org/issue31371
msg376563 - (view) Author: E. Paine (epaine) * Date: 2020-09-08 11:33
+1

I think this would be very helpful as the only places I can find its deprecation are a small note at the top of the Tix Python docs [https://github.com/python/cpython/commit/bd63353] and a news entry a long way down the 3.6 release notes https://docs.python.org/3/whatsnew/3.6.html#id7 [https://github.com/python/cpython/commit/ba41c81].

While I agree with @Zachary's comment on #29125 that the injection bug probably would be a reasonable excuse to remove Tix, I believe we should first "properly" deprecate it (I can imagine a few users getting caught out if we remove it without raising a DeprecationWarning in previous versions).

IMO, #31371 should be reopened once this has been merged to facilitate removal in a future version and allow discussion for which version removal should occur in. I also think that we should back-port this to 3.8/9 to give users more notice than they might otherwise get.

@wyz23x2, are you alright to write a patch for this? (I assume no-one has any objections given that Tix is already deprecated)
msg376675 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-09-10 09:58
OK. What should the message be? "tkinter.tix is deprecated (and will be removed in Python 3.x), use tkinter.ttk instead"?
msg376677 - (view) Author: E. Paine (epaine) * Date: 2020-09-10 10:18
As I believe planning for removal (including the version this should occur in) is better suited to #31371, I think it would be best to remain non-committal about the version. I would personally prefer something a little more vague (such as below), though as I keep saying, this is just my opinion.

DeprecationWarning: the tkinter.tix module is deprecated in favour of tkinter.ttk and is set to be removed in the near-future

It *may* also be nice to clarify in the docs why Tix is deprecated (i.e. unmaintained), though I will leave this (like the deprecation message) at your discretion.
msg376679 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-09-10 11:31
@epaine The doc (https://docs.python.org/3/library/tkinter.tix.html) states "This Tk extension is unmaintained and should not be used in new code.".
msg376680 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-09-10 11:49
All tests have passed. Now it's time to merge!
msg376683 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-09-10 12:35
Can any core reviewer review the PR?
msg376707 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-09-11 09:28
Ping? We will miss 3.8.6/3.9.0rc2 if it's too late!
msg376826 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-09-13 06:04
Ping...
History
Date User Action Args
2020-09-13 06:04:55wyz23x2setmessages: + msg376826
2020-09-11 09:28:52wyz23x2setmessages: + msg376707
2020-09-10 12:35:16wyz23x2setmessages: + msg376683
2020-09-10 11:49:22wyz23x2setmessages: + msg376680
2020-09-10 11:31:19wyz23x2setmessages: + msg376679
2020-09-10 11:26:49wyz23x2setkeywords: + patch
stage: patch review
pull_requests: + pull_request21246
2020-09-10 10:18:25epainesetmessages: + msg376677
2020-09-10 09:58:37wyz23x2setmessages: + msg376675
2020-09-08 11:33:13epainesetnosy: + zach.ware, epaine

messages: + msg376563
versions: + Python 3.8
2020-09-06 07:52:57xtreaksetnosy: + gpolo, xtreak, serhiy.storchaka
messages: + msg376459
2020-09-06 03:54:50wyz23x2create