Skip to content

gh-85792: Update shebang to python3 #130863

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

Closed
wants to merge 1 commit into from
Closed

Conversation

sandy-lcq
Copy link

@sandy-lcq sandy-lcq commented Mar 5, 2025

According to PEP 394, python may or may not be installed depending on a distribution or system configuration, so update the shebang to python3

[1] https://peps.python.org/pep-0394/

@bedevere-app
Copy link

bedevere-app bot commented Mar 5, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@sandy-lcq
Copy link
Author

I checked the devguide, step8 said Add a News entry into the Misc/NEWS.d directory as individual file. But I checked dir Misc/NEWS.d/ , seems like not all fixes have add a News entry. I am not sure if this small fix need it.

Copy link
Member

Choose a reason for hiding this comment

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

For this file, it would be better to remove the shebang and executable bit.
(Ref previous PR and ticket)

@merwok
Copy link
Member

merwok commented Mar 5, 2025

The linked ticket is closed. Before opening PRs, could you comment in tickets first?

(In the Python project, we like to discuss should we do something in an issue or on the forum first, then the PR and its reviews can focus on how to do it. But first we agree about the need for the thing.)

According to PEP 394, python may or may not be installed depending on a
distribution or system configuration, so update the shebang to python3

[1] https://peps.python.org/pep-0394/

Signed-off-by: Changqing Li <[email protected]>
@merwok
Copy link
Member

merwok commented Mar 5, 2025

Please read the devguide and avoid force pushes – thanks!

@brettcannon brettcannon removed their request for review March 5, 2025 18:12
Copy link
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

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

FWIW, the 2 WASM script updates make sense to me. The others make sense as well on the face of it, but I'll leave it up to those domain experts to verify.

@sandy-lcq
Copy link
Author

sandy-lcq commented Mar 7, 2025

Please read the devguide and avoid force pushes – thanks!

Hi,
Thanks for your comments. I had read this guide: https://devguide.python.org/
but no related info about how to push the new commit for fix comments.
If force push is not allowed, can you give a little guide how to do?
Here are two options I think maybe work:

  1. Do I need to push another commit with --fixup, and you will merge the fixup commit and the original commit into one when merge it to offical master?
  2. Do I need to close this pull request and create a new pull request with the whole fix?

Since I already force pushed for this pull request, do I need to close this one, and create another pull request?

@freakboy3742
Copy link
Contributor

Hi, Thanks for your comments. I had read this guide: https://devguide.python.org/ but no related info about how to push the new commit for fix comments. If force push is not allowed, can you give a little guide how to do? Here are two options I know:

You don't need to "fix" the old commit - we want to see the process of getting to the final result reflected in the commit history. So - you make a new commit, on top of previous commits, and push the update to the PR's branch. No --amend, --fixup, or new PR required. That way, any previous reviewers can see exactly what has changed since the last review (by looking at each individual commit); and any historical comments won't be lost because the line they're referring to no longer exists.

If/when the PR is accepted, Python uses merge commits to merge the PR - so even if your development process required 20 tiny back-and-forth commits to get all the details right, this PR will result in a single commit on Python's main branch.

@sandy-lcq
Copy link
Author

Hi, Thanks for your comments. I had read this guide: https://devguide.python.org/ but no related info about how to push the new commit for fix comments. If force push is not allowed, can you give a little guide how to do? Here are two options I know:

You don't need to "fix" the old commit - we want to see the process of getting to the final result reflected in the commit history. So - you make a new commit, on top of previous commits, and push the update to the PR's branch. No --amend, --fixup, or new PR required. That way, any previous reviewers can see exactly what has changed since the last review (by looking at each individual commit); and any historical comments won't be lost because the line they're referring to no longer exists.

If/when the PR is accepted, Python uses merge commits to merge the PR - so even if your development process required 20 tiny back-and-forth commits to get all the details right, this PR will result in a single commit on Python's main branch.

Thanks, got it. I thought the community need a clean history before. Since I already forced push for last comments fix, I cannot get them back, so I will do nothing now, if there is more comments later, I will follow up the guide.

@JelleZijlstra JelleZijlstra removed their request for review March 15, 2025 03:33
@sandy-lcq
Copy link
Author

@merwok kindly ping, anything else need me to do?

Copy link
Member

Choose a reason for hiding this comment

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

Is this change useful? Are there people invoking Parser/asdl_c.py like this, or is it the makefile (and other build systems) running something like $PYTHON_FOR_BUILD $srcdir/Parser/asdl_c.py ?

@AA-Turner
Copy link
Member

I don't think this PR is useful: developers have managed without it for several years. We might accept a PR that just removed shebangs from the files in Lib/.

A

@AA-Turner AA-Turner closed this Apr 3, 2025
@merwok
Copy link
Member

merwok commented Apr 3, 2025

I agree with Adam. Thanks for the PR regardless!

If you decide to create a smaller PR, please create a new ticket: the other one is about tools and already closed as solved in 3.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants