Sitelet https://github.com/python/cpython/issues/97669
Skip to content

Remove outdated Tools/scripts/ example scripts #97669

Description

@vstinner

The Tools/scripts/ directory contains more than 70+ example scripts. Most of them are outdated and short scripts Python which are simple to rewrite. When I asked other core developers, they suggest to remove all of them, see the discussion:

https://discuss.python.org/t/remove-outdated-tools-scripts-scripts/19571

I created this issue to look into these scripts and see what to do with them.

Activity

  1. vstinner commented on Sep 30, 2022

    @vstinner
    MemberAuthor

    analyze_dxp.py: I created issue #97670 to remove the sys.getdxp() function and the Tools/scripts/analyze_dxp.py script.

  2. vstinner commented on Sep 30, 2022

    @vstinner
    MemberAuthor

    See also issue #97649: Do not install Tools directory on Windows.

  3. vstinner commented on Sep 30, 2022

    @vstinner
    MemberAuthor

    I created PR #97675 to remove a first batch of outdated example scripts.

  4. vstinner commented on Oct 3, 2022

    @vstinner
    MemberAuthor

    @warsaw @gpshead @gvanrossum: Would you mind to approve formally this PR since you are in favor of removing Tools/scripts/ scripts according to your messages on https://discuss.python.org/t/remove-outdated-tools-scripts-scripts/19571?

  5. added a commit that references this issue on Oct 4, 2022
  6. vstinner commented on Oct 6, 2022

    @vstinner
    MemberAuthor

    I created a draft PR #97963 to create a new Tools/build/ sub-directory which contains scripts used to build Python. I moved 13 scripts there. Not sure if it's a good idea or not.

    With PR #97963 and PR #97964, the remaining scripts in Tools/scripts/ are:

    Programs (3):

    • 2to3
    • idle3
    • pydoc3

    Scripts (19):

    • abitype.py
    • checkpip.py
    • combinerefs.py
    • eptags.py
    • gprof2html.py
    • md5sum.py
    • nm2def.py
    • patchcheck.py
    • pathfix.py
    • pep384_macrocheck.py
    • ptags.py
    • reindent.py
    • run_tests.py
    • startuptime.py
    • summarize_stats.py
    • untabify.py: used by patchcheck.py
    • var_access_benchmark.py
    • verify_ensurepip_wheels.py
    • win_add2path.py

    patchcheck.py, run_tests.py and verify_ensurepip_wheels.py are used by the Python workflow. Does it deserve its own sub-directory?

  7. vstinner commented on Oct 6, 2022

    @vstinner
    MemberAuthor

    I created PR #97964 to move diff.py and ndiff.py scripts to the difflib documentation (to Doc/includes/).

  8. added a commit that references this issue on Oct 7, 2022
  9. vstinner commented on Oct 10, 2022

    @vstinner
    MemberAuthor

    Oh nice, 4ed00be removed eptags.py and ptags.py.

  10. vstinner commented on Oct 10, 2022

    @vstinner
    MemberAuthor

    PR to remove 5 more scripts: PR #98167

    PR to remove abitype.py and pep384_macrocheck.py: PR #98165

  11. added a commit that references this issue on Oct 11, 2022
  12. added 5 commits that reference this issue on Oct 11, 2022
  13. vstinner commented on Oct 12, 2022

    @vstinner
    MemberAuthor

    Updated list of Tools/scripts/ scripts. With PR #97963, there are only 8 remaining scripts.

    Programs (3):

    • 2to3
    • idle3
    • pydoc3

    Misc (5):

    Update: I moved verify_ensurepip_wheels.py to Tools/build/ in my PR #97963.

  14. added a commit that references this issue on Oct 17, 2022
  15. vstinner commented on Oct 17, 2022

    @vstinner
    MemberAuthor

    I moved 16 scripts to a new Tools/build/ directory: 1863302

    There are 9 remaining files in Tools/scripts/, including the README file (so 8 scripts):

    2to3
    checkpip.py
    combinerefs.py
    idle3
    pydoc3
    README
    run_tests.py
    summarize_stats.py
    var_access_benchmark.py
    
  16. added a commit that references this issue on Oct 17, 2022
  17. vstinner commented on Nov 3, 2022

    @vstinner
    MemberAuthor

    I removed enough scripts, I close the issue :-)

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

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions