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
Show deprecation warnings for tkinter.tix #85896
Comments
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. |
The removal was suggested before but not merged in https://bugs.python.org/issue31371 |
+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 bpo-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, bpo-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) |
OK. What should the message be? "tkinter.tix is deprecated (and will be removed in Python 3.x), use tkinter.ttk instead"? |
As I believe planning for removal (including the version this should occur in) is better suited to bpo-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. |
@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.". |
All tests have passed. Now it's time to merge! |
Can any core reviewer review the PR? |
Ping? We will miss 3.8.6/3.9.0rc2 if it's too late! |
Ping... |
Um, is this going on? |
When this issue was submitted on September 5, 2020, Python 3.9 was still in beta/rc stages. Now 242 days have passed and the developing of 3.11 has started. :) |
Merged! |
Unfortunately this commit has introduced some reference leaks, see: https://buildbot.python.org/all/#/builders/684/builds/5 Could someone take a look? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: