Skip to content

Remove dead code from Tkinter.py #48600

Closed

Description

@gpolo
mannequin
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']

    Activity

    1. gpolo commented on Nov 19, 2008

      gpolomannequin
      MannequinAuthor

      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.

    2. BreamoreBoy commented on Aug 4, 2010

      BreamoreBoymannequin
      Mannequin

      Ther title says it all, can we commit this?

    3. pysquared commented on Feb 24, 2011

      pysquaredmannequin
      Mannequin

      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)
    4. gpolo commented on Mar 6, 2011

      gpolomannequin
      MannequinAuthor

      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 ?

    5. serhiy-storchaka commented on Jan 4, 2013

      @serhiy-storchaka
      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.

    6. birkenfeld commented on Jan 11, 2013

      @birkenfeld
      Member

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

    7. added
      type-featureA feature request or enhancement
      and removed
      type-bugAn unexpected behavior, bug, or error
      on Jan 11, 2013
    8. serhiy-storchaka commented on Jun 2, 2014

      @serhiy-storchaka
      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

    9. python-dev commented on Jul 23, 2014

      python-devmannequin
      Mannequin

      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

    10. python-dev commented on Jul 25, 2014

      python-devmannequin
      Mannequin

      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

    11. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions