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
Removing apparently unwanted functions from Tkinter #47285
Comments
Patch for removing some unwanted, and probably not used, functions at |
If this stuff needs to be removed it should probably go through the deprecation process. |
Pushed as PendingDepricationWarnings for upcoming 3.3 |
New changeset d42f264f291e by Andrew Svetlov in branch 'default': |
PendingDeprecationWarning would mean that we are going to remove it "someday". If you actually want to remove them in a reasonable time, you should use "DeprecationWarning" in 3.3, and then remove them in 3.4. But is there a need to remove them? Maybe PendingDeprecationWarning is right and we'll remove them in Python4 :) |
Also, posting a patch for review before committing is a good idea. If you don't get a review in a reasonable time period, then as a committer you can of course go ahead and commit, based on your judgement. |
I do not know or directly use tkinter enough to judge the proposed removal. (Although they do look like they might be useless.) I would like to see a little more explanation on the record. Who wrote Also, deprecation messages often give the alternative or replacement to what is being removed. Are these so useless that there is no replacement? |
David Murray, Terry J. Reedy, the message what you asked was made by GvR in 1995. Now I think we need to deprecate that functions, but also add keyword-only parameters in widgets methods which can accept that ones. I'll make a patch for that. Thank you for mentoring. |
You are theoretically right about not posting trivial patches, but as you can see, sometimes even a trivial patch elicits unexpected insights. So I like to always post my patches, even the seemingly trivial ones. Then if I don't get any responses, I figure it is OK to to ahead on the trivial ones :) Of course, I don't do this 100% of the time. This is especially true if there has been prior discussion, or sometimes discussion on IRC (although in the latter case I still may post the patch and always post summary of the IRC discussion). As for the deprecation process. PendingDeprecationWarning was introduced for...I forget which feature it was. Something that was going to be around for several releases, anyway. And I think that feature wound up not getting removed until Python3, but I don't remember for sure. Then for a short time we did start using it as you say, giving a three release deprecation cycle (pending, deprecated, gone), but that was before deprecation warnings were made silent. PendingDeprecations were silent, you see, so using them one release early was a hack around the fact that DeprecationWarnings were *not* silent. On the other hand I think we've gotten more strict about "needless" deprecations. If there's no harm in leaving something in, we leave it in. It's too bad Guido's comment wasn't noticed at the Python3 boundary; that is the perfect time to remove such cruft. So doing a PendingDeprecationWarning to remind ourselves that this is something we want to remove in Python4 is also a reasonable approach. Really, I think this is an area where our procedures and criteria are still a bit in flux... |
Usually, I would counsel against removing anything that isn't broken by design, but the code for these functions offers nothing substantive. So, +1 for marking as deprecated in 3.3 and removing in 3.4. |
Updated patch. Warning type is DeprecationWarning, docs mentioned that. |
Raymond is suggesting removal in 3.4, and given that we are doing it I don't see any reason to wait for 3.5, either, so you probably want to update the warning messages to say 3.4 instead of 3.5. Otherwise it looks good to me. Ezio suggested adding a test that fails if we don't do the deprecation in 3.4 (that is, when the feature release number changes, the test starts failing). And/or you can open a new 3.4-only issue "remove deprecated tkinter functions" and mark it as a release blocker. |
Thank you, David. I've updated the patch. I think making new test for check is easy but bpo-14446 is good enough. |
New changeset 2bc374182ed4 by Andrew Svetlov in branch 'default': |
I've updated the patch following David's recommendations, pushed it into default branch. bpo-14446 has been made to remove deprecated code in 3.4 Closing the issue as fixed. |
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: