Bug 2090866 - Python: Add -P to default shebangs
Summary: Python: Add -P to default shebangs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Changes Tracking
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Python Maintainers
QA Contact:
URL:
Whiteboard:
Depends On: PYTHON3.11
Blocks: F37Changes
TreeView+ depends on / blocked
 
Reported: 2022-05-26 18:03 UTC by Ben Cotton
Modified: 2022-11-15 16:22 UTC (History)
4 users (show)

Fixed In Version: python-rpm-macros-3.11-3.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 16:22:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ben Cotton 2022-05-26 18:03:34 UTC
This is a tracking bug for Change: Python: Add -P to default shebangs
For more details, see: https://fedoraproject.org/wiki/Changes/PythonSafePath

The -P flag will be added to the Python shebang macros (%{py3_shbang_opts}, %{py3_shebang_flags}, ...). Packages that adhere to those macros will change their Python shebangs from #! /usr/bin/python3 -s to #! /usr/bin/python3 -sP and as a result, will no longer have the directory of the script (such as /usr/bin) in sys.path. An opt-out mechanism exists.

If you encounter a bug related to this Change, please do not comment here. Instead create a new bug and set it to block this bug.

Comment 2 Miro Hrončok 2022-07-20 15:58:10 UTC
Python Packaging guidelines update: https://pagure.io/packaging-committee/pull-request/1191

Comment 3 Ben Cotton 2022-11-15 16:22:28 UTC
F37 was released today, so I am closing this tracker. If this Change was not completed, please notify me ASAP.


Note You need to log in before you can comment on or make changes to this bug.