Skip to content

Remove code made dead long ago with #if 0 #91076

Description

@arhadthedev
BPO 46920
Nosy @mdickinson, @vstinner, @ezio-melotti, @arhadthedev
PRs
  • bpo-46920: Remove code made dead long ago with #if 0 #31681
  • bpo-46920: Remove an old, elementtree-specific leak detector #31811
  • bpo-46920: Remove disabled debug code added decades ago and likely unnecessary #31812
  • bpo-46920: Remove code that has explainers why it was disabled #31813
  • bpo-46920: Remove code that has no explainer why it was disabled #31814
  • 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 = None
    closed_at = <Date 2022-03-14.16:58:01.166>
    created_at = <Date 2022-03-04.12:13:16.134>
    labels = ['extension-modules', 'interpreter-core', 'type-feature', 'expert-unicode', '3.11']
    title = 'Remove code made dead long ago with #if 0'
    updated_at = <Date 2022-03-14.17:03:06.996>
    user = 'https://github.com/arhadthedev'

    bugs.python.org fields:

    activity = <Date 2022-03-14.17:03:06.996>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2022-03-14.16:58:01.166>
    closer = 'arhadthedev'
    components = ['Extension Modules', 'Interpreter Core', 'Unicode']
    creation = <Date 2022-03-04.12:13:16.134>
    creator = 'arhadthedev'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 46920
    keywords = ['patch']
    message_count = 8.0
    messages = ['414519', '414520', '414596', '415153', '415154', '415155', '415156', '415166']
    nosy_count = 4.0
    nosy_names = ['mark.dickinson', 'vstinner', 'ezio.melotti', 'arhadthedev']
    pr_nums = ['31681', '31811', '31812', '31813', '31814']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue46920'
    versions = ['Python 3.11']

    Activity

    1. arhadthedev commented on Mar 4, 2022

      @arhadthedev
      MemberAuthor

      git grep "#if 0" gives the following occurences of dead code (analyzed with git blame, removed by a linked pull request):

    2. arhadthedev commented on Mar 4, 2022

      @arhadthedev
      MemberAuthor

      Also forgot to add that git grep "#if 1" gives the following:

      • added on 20 Nov 2014 by d600951: cpython/Python/pylifecycle.c:2427. "/* Disable this if you have trouble debugging bootstrap stuff */" - after seven years, no trouble was found so this always-true guard has no use.
    3. arhadthedev commented on Mar 5, 2022

      @arhadthedev
      MemberAuthor

      I reverted my changes in Modules/_ctypes/libffi_osx/x86/x86-ffi64.c and Modules/_decimal/libmpdec/*step.c to not disturb third-party vendored libraries.

      As a result, macOS component is no longer affected along with the corresponding experts in a nosy list.

    4. vstinner commented on Mar 14, 2022

      @vstinner
      Member

      New changeset e885ac3 by Oleg Iarygin in branch 'main':
      bpo-46920: Remove code that has no explainer why it was disabled (GH-31814)
      e885ac3

    5. vstinner commented on Mar 14, 2022

      @vstinner
      Member

      New changeset a52f82b by Oleg Iarygin in branch 'main':
      bpo-46920: Remove disabled debug code added decades ago and likely unnecessary (GH-31812)
      a52f82b

    6. vstinner commented on Mar 14, 2022

      @vstinner
      Member

      New changeset 13b0412 by Oleg Iarygin in branch 'main':
      bpo-46920: Remove code that has explainers why it was disabled (GH-31813)
      13b0412

    7. vstinner commented on Mar 14, 2022

      @vstinner
      Member

      Can this issue be closed? Or is there remaining dead code that you want to remove?

    8. vstinner commented on Mar 14, 2022

      @vstinner
      Member

      Thanks Oleg Iarygin for the cleanup!

    9. 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

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions