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

bpo-41626: Remove the shebang of internal Tools to avoid confusion. #23581

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copy link
Member

@shihai1991 shihai1991 commented Dec 1, 2020

The following files' shebang now be removed:

  • Mac/BuildScript/build-installer.py
  • Modules/_sha3/cleanup.py
  • Objects/typeslots.py
  • Parser/asdl_c.py
  • Python/makeopcodetargets.py
  • Tools/clinic/clinic.py
  • Tools/peg_generator/pegen/main.py

https://bugs.python.org/issue41626

@shihai1991 shihai1991 changed the title bpo41626: Remove the shebang of inner Tools. bpo-41626: Remove the shebang of inner Tools. Dec 1, 2020
@shihai1991 shihai1991 changed the title bpo-41626: Remove the shebang of inner Tools. bpo-41626: Remove the shebang of inner Tools to avoid confusion. Dec 1, 2020
@shihai1991
Copy link
Author

@shihai1991 shihai1991 commented Dec 1, 2020

@merwok @ned-deily Hi, Eric, Ned. Can you take a look when you have free time? Thanks.

@merwok
Copy link

@merwok merwok commented Dec 1, 2020

Does «inner Tools» mean «internal Tools» (used for CPython dev but not for regular people)?

@shihai1991
Copy link
Author

@shihai1991 shihai1991 commented Dec 2, 2020

Does «inner Tools» mean «internal Tools» (used for CPython dev but not for regular people)?

Yes. I am not a native English speaker, so I don't there have the obvious difference between internal with inner. If internal will be more exact, I can update it :)

@shihai1991 shihai1991 changed the title bpo-41626: Remove the shebang of inner Tools to avoid confusion. bpo-41626: Remove the shebang of internal Tools to avoid confusion. Dec 2, 2020
@@ -1,5 +1,4 @@
#!/usr/bin/python
# Usage: typeslots.py < Include/typeslots.h typeslots.inc
# Usage: ./python typeslots.py < Include/typeslots.h typeslots.inc
Copy link
Member

@encukou encukou Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong; either you're in the directory with ./python or in Objects.
Same for _sha3/cleanup.py. Did you try these commands?

Copy link
Member Author

@shihai1991 shihai1991 Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong; either you're in the directory with ./python or in Objects.

Oh, you are right. I just point out developer should use ./python in old usage. Using entire command would be better. I will update it.

Same for _sha3/cleanup.py. Did you try these commands?

the command in _sha3/cleanup.py is a entire command.

Copy link
Member Author

@shihai1991 shihai1991 Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There have an another question. Typeslots.py should be moved to the dir of Tools? It's weird leave it alone in Objects. Maybe we should open an new bpo to discuss it.

@@ -1,5 +1,3 @@
#!/usr/bin/env python3
#
Copy link
Member

@encukou encukou Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think Clinic needs a locally built Python.

Copy link
Member Author

@shihai1991 shihai1991 Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It doesn't need a local builtin python. There have docs to introduce how to run this clinic.py. So I think remove it would be better(Avoid update the python version again and again).

@@ -1,4 +1,3 @@
#! /usr/bin/env python
Copy link
Member

@encukou encukou Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think makeopcodetargets needs a locally built Python. Does it?

Copy link
Member Author

@shihai1991 shihai1991 Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. It will be called in makefile: https://github.com/python/cpython/blob/master/Makefile.pre.in#L946.
So I think the shebang haven't worked in here.

@github-actions
Copy link

@github-actions github-actions bot commented Jan 4, 2021

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jan 4, 2021
@tiran tiran removed their request for review Apr 18, 2021
@markshannon markshannon removed their request for review Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting merge CLA signed skip news stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants