Skip to content

gh-85792: Update shebang to python3 #108273

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 6,573 commits into from
Closed

gh-85792: Update shebang to python3 #108273

wants to merge 6,573 commits into from

Conversation

sandy-lcq
Copy link

@sandy-lcq sandy-lcq commented Aug 22, 2023

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/

@sandy-lcq sandy-lcq requested a review from terryjreedy as a code owner August 22, 2023 09:07
@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@terryjreedy terryjreedy changed the title Update shebang to python3 gh-85792: Update shebang to python3 Aug 23, 2023
@terryjreedy
Copy link
Member

Thank you for your interest in improving Python. While this may seem trivial, and not in need of discussion on an issue, it is not. There is no python3 on Windows when installed from the python.org installer. In the other hand, we recommend that on Windows, people use the py launcher and not add python.exe to the path. So the shebang gets less use on Windows, but possibly not none.

The idlelib file is a dummy for testing only. I want to modify it and other files for different purposes on a different issue.

As near as I can tell, some files intended for command-line execution have a shebang with 'python3', others have no shebang line. This seems unique in having 'python'. So the remaining change seems appropriate.

I attached the PR to an existing issue whose discussion included this codec module.

@merwok
Copy link
Member

merwok commented Aug 23, 2023

I would rather remove the shebang and executable bit – see linked ticket.

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

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

tomasr8 and others added 18 commits March 5, 2025 09:51
…130194)

Remove the caching `_is_case_sensitive()` function. 

The cache used to speed up `PurePath.[full_]match()` and `Path.[r]glob()`,
but that's no longer the case - these methods use
`self.parser is posixpath` to determine case sensitivity.

This makes the `pathlib._abc` module a little easier to backport to Python
3.8, where `functools.cache()` is unavailable.
…H-129427)" (python#130201)

* Revert "pythongh-118761: Improve import time of `subprocess` (pythonGH-129427)"

This reverts commit 49f2465.
Also known as f502c8f in 3.13 (PR python#129447)
Also known as f65aa0d in 3.12 (PR python#129448)

This caused bugs in the `__del__` finalizer:
 python#118761 (comment)

---------

Co-authored-by: Bénédikt Tran <[email protected]>
…ythonGH-130008)

Remove broken singledispatchmethod caching introduced in pythongh-85160.
Achieve the same performance using different optimization.

* Add more tests.

* Fix issues with __module__ and __doc__ descriptors.
…GH-128154)

Fix UBSan failures for `PyBaseExceptionObject`, `PyStopIterationObject`, `PySystemExitObject`, `PyImportErrorObject`, `PyOSErrorObject`,  `PyNameErrorObject`,  `PyAttributeErrorObject`, `PySyntaxErrorObject`,  `KeyError`,  `UnicodeError*`, `PyBaseExceptionGroupObject`

Remove redundant casts

Align the naming convention `Py[...]_CAST(op)` where only an assert-only type check is performed.
…thonGH-129779)

Fix UBSan failures for `XIBufferViewObject`

Remove redundant casts, suppress unused return values
…python#129773)

Fix some UBSan failures for `dequeobject`, `dequeiterobject`, `defdictobject` and `tuplegetterobject`.

We also perform some cleanup by suppressing unused return values and renaming the
unused argument in `METH_NOARGS` methods to `dummy` for semantic purposes.
…ded build (pythonGH-130089)

* pythongh-129701: Fix a data race in `intern_common` in the free threaded build

* Use a mutex to avoid potentially returning a non-immortalized string,
  because immortalization happens after the insertion into the interned
  dict.

* Use `Py_DECREF()` calls instead of `Py_SET_REFCNT(s, Py_REFCNT(s) - 2)`
  for thread-safety. This code path isn't performance sensistive, so
  just use `Py_DECREF()` unconditionally for simplicity.
…nGH-129781)

Fix UBSan failures for `PyScannerObject`, fix UBSan failures for `PyEncoderObject`
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.