classification
Title: Remove dead code from Tkinter.py
Type: enhancement Stage: resolved
Components: Tkinter Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: georg.brandl, gpolo, pysquared, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2008-11-19 00:14 by gpolo, last changed 2014-07-25 09:31 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
remove_dead_code.diff gpolo, 2008-11-19 00:14
tkinter_remove_dead_code-3.5.diff serhiy.storchaka, 2014-06-02 10:00 review
Messages (9)
msg76030 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-11-19 00:14
There are some methods (which call tk commands) that no longer exist,
for a long time now so this patch remove them.

There are also these "indices" functions, which do not belong to the
module space and now are gone too.
msg112873 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-08-04 19:45
Ther title says it all, can we commit this?
msg129263 - (view) Author: Graham Horler (pysquared) Date: 2011-02-24 14:36
Are we sure this is dead code, and not just out of date?

e.g. this works, and I use it in production with "if Tkinter.TkVersion >= 8.4":

b = Tkinter.Button(root)
b.tk.call('tk::ButtonEnter', b._w)
msg130175 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2011-03-06 15:50
If we consider the meaning of "dead code" as that used in compilers, then I meant "out of date" code.

If you want to add support for tk::ButtonEnter then I believe you should open a new issue and raise your points there. Anyway, have you read http://www.mail-archive.com/python-list@python.org/msg210494.html ? Does it relate to your use case ?
msg179069 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-01-04 19:08
LGTM. However I am not sure should this issue be classified as "behavior" or "enhancement". Removed code is not usable in Tk versions which supported in Python 2.7 and 3.2+ and can be removed safely.
msg179716 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-01-11 18:17
This kind of change is very similar to other "cleanup" changes, so the classification of "not a bug fix" seems valid.
msg219564 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-06-02 10:00
Patch is synchronized with tip. It also removes Studbutton and Tributton classes which depend on removed methods. These classes are not documented, not tested and never worked in supported Python versions. I even not found reasonable links in Google, except an annotation [1] and autogenerated from Tkinter sources docs.

I now think that perhaps we should apply this patch to 2.7 and 3.4 too. Non-working (and non-worked last 10 or 15 or more years) code only confuses people.

[1] http://legacy.python.org/search/hypermail/python-1994q2/1023.html
msg223768 - (view) Author: Roundup Robot (python-dev) Date: 2014-07-23 19:33
New changeset 549a7615abe3 by Serhiy Storchaka in branch 'default':
Issue #4350: Removed a number of out-of-dated and non-working for a long time
http://hg.python.org/cpython/rev/549a7615abe3
msg223934 - (view) Author: Roundup Robot (python-dev) Date: 2014-07-25 09:31
New changeset 7e6beea0eeab by Serhiy Storchaka in branch 'default':
Issue #22061: Restored empty obsolete methods removed in issue #4350 and
http://hg.python.org/cpython/rev/7e6beea0eeab
History
Date User Action Args
2014-07-25 09:31:54python-devsetmessages: + msg223934
2014-07-23 19:35:13serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2014-07-23 19:33:45python-devsetnosy: + python-dev
messages: + msg223768
2014-06-02 10:00:43serhiy.storchakasetfiles: + tkinter_remove_dead_code-3.5.diff

messages: + msg219564
2014-06-02 07:59:21serhiy.storchakasetversions: + Python 3.5, - Python 3.4
2014-02-03 15:49:17BreamoreBoysetnosy: - BreamoreBoy
2013-10-31 16:07:37serhiy.storchakasetassignee: serhiy.storchaka
2013-01-11 20:49:18serhiy.storchakasetcomponents: + Tkinter
2013-01-11 20:45:19serhiy.storchakasetstage: patch review -> commit review
type: behavior -> enhancement
versions: - Python 2.7, Python 3.2, Python 3.3
2013-01-11 18:17:42georg.brandlsetmessages: + msg179716
2013-01-04 19:08:36serhiy.storchakasetnosy: + georg.brandl, serhiy.storchaka

messages: + msg179069
versions: + Python 3.3, Python 3.4, - Python 3.1
2011-03-06 15:50:59gpolosetnosy: pysquared, gpolo, BreamoreBoy
messages: + msg130175
2011-02-24 14:36:20pysquaredsetnosy: + pysquared
messages: + msg129263
2010-08-04 19:45:21BreamoreBoysetversions: + Python 3.1, Python 3.2, - Python 3.0
nosy: + BreamoreBoy

messages: + msg112873

type: behavior
stage: patch review
2009-02-09 22:04:09gpololinkissue775309 superseder
2008-11-19 00:14:18gpolocreate