Skip to content
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

Remove dead code from Tkinter.py #48600

Closed
gpolo mannequin opened this issue Nov 19, 2008 · 9 comments
Closed

Remove dead code from Tkinter.py #48600

gpolo mannequin opened this issue Nov 19, 2008 · 9 comments
Assignees
Labels
topic-tkinter type-feature A feature request or enhancement

Comments

@gpolo
Copy link
Mannequin

gpolo mannequin commented Nov 19, 2008

BPO 4350
Nosy @birkenfeld, @serhiy-storchaka
Files
  • remove_dead_code.diff
  • tkinter_remove_dead_code-3.5.diff
  • 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:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2014-07-23.19:35:13.821>
    created_at = <Date 2008-11-19.00:14:18.283>
    labels = ['type-feature', 'expert-tkinter']
    title = 'Remove dead code from Tkinter.py'
    updated_at = <Date 2014-07-25.09:31:54.254>
    user = 'https://bugs.python.org/gpolo'

    bugs.python.org fields:

    activity = <Date 2014-07-25.09:31:54.254>
    actor = 'python-dev'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2014-07-23.19:35:13.821>
    closer = 'serhiy.storchaka'
    components = ['Tkinter']
    creation = <Date 2008-11-19.00:14:18.283>
    creator = 'gpolo'
    dependencies = []
    files = ['12050', '35444']
    hgrepos = []
    issue_num = 4350
    keywords = ['patch']
    message_count = 9.0
    messages = ['76030', '112873', '129263', '130175', '179069', '179716', '219564', '223768', '223934']
    nosy_count = 5.0
    nosy_names = ['georg.brandl', 'pysquared', 'gpolo', 'python-dev', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue4350'
    versions = ['Python 3.5']

    @gpolo
    Copy link
    Mannequin Author

    gpolo mannequin commented Nov 19, 2008

    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.

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Aug 4, 2010

    Ther title says it all, can we commit this?

    @BreamoreBoy BreamoreBoy mannequin added the type-bug An unexpected behavior, bug, or error label Aug 4, 2010
    @pysquared
    Copy link
    Mannequin

    pysquared mannequin commented Feb 24, 2011

    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)

    @gpolo
    Copy link
    Mannequin Author

    gpolo mannequin commented Mar 6, 2011

    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 ?

    @serhiy-storchaka
    Copy link
    Member

    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.

    @birkenfeld
    Copy link
    Member

    This kind of change is very similar to other "cleanup" changes, so the classification of "not a bug fix" seems valid.

    @serhiy-storchaka serhiy-storchaka added type-feature A feature request or enhancement topic-tkinter and removed type-bug An unexpected behavior, bug, or error labels Jan 11, 2013
    @serhiy-storchaka serhiy-storchaka self-assigned this Oct 31, 2013
    @serhiy-storchaka
    Copy link
    Member

    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

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 23, 2014

    New changeset 549a7615abe3 by Serhiy Storchaka in branch 'default':
    Issue bpo-4350: Removed a number of out-of-dated and non-working for a long time
    http://hg.python.org/cpython/rev/549a7615abe3

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 25, 2014

    New changeset 7e6beea0eeab by Serhiy Storchaka in branch 'default':
    Issue bpo-22061: Restored empty obsolete methods removed in issue bpo-4350 and
    http://hg.python.org/cpython/rev/7e6beea0eeab

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-tkinter type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants