-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
gh-148641: Flesh out PEP 829 for What's New #149347
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,7 +91,7 @@ Summary -- Release highlights | |
| * :ref:`Improved error messages <whatsnew315-improved-error-messages>` | ||
| * :ref:`The official Windows 64-bit binaries now use the tail-calling interpreter | ||
| <whatsnew315-windows-tail-calling-interpreter>` | ||
| * :pep:`829`: Package Startup Configuration Files | ||
| * :pep:`829`: :ref:`Package Startup Configuration Files <whatsnew315-startup-files>` | ||
|
|
||
| New features | ||
| ============ | ||
|
|
@@ -452,6 +452,31 @@ If not using a build tool -- or when writing such a tool -- you can select | |
| in :ref:`abi3-compiling`. | ||
|
|
||
|
|
||
| .. _whatsnew315-startup-files: | ||
|
|
||
| :pep:`829`: Startup Configuration Files | ||
| --------------------------------------- | ||
|
warsaw marked this conversation as resolved.
|
||
|
|
||
| Loaded by the :mod:`site` module when ``-S`` is not given, :file:`.pth` files | ||
| can contain lines that both extend :data:`sys.path` and execute arbitrary code | ||
| when the line starts with ``import`` (followed by a space or tab). The latter | ||
| functionality can be problematic, since it is difficult to know exactly what | ||
| gets executed when Python starts up. | ||
|
Comment on lines
+460
to
+464
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's link something to the new |
||
|
|
||
| As a step towards improving the ability to audit pre-start executable code, | ||
| Python 3.15 introduces :file:`.start` files which contain entry point | ||
| specifications of the form ``pkg.mod:callable`` where ``pkg.mod`` is the | ||
| import path to the given callable. When Python starts up, the callable is | ||
| located and called with no arguments. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And link to |
||
|
|
||
| ``import`` lines in :file:`.pth` files are silently deprecated. When a | ||
| matching :file:`.start` file is found, ``import`` lines in :file:`.pth` files | ||
| are ignored. There is no change to :data:`sys.path` extension lines in | ||
| :file:`.pth` files. | ||
|
|
||
| (Contributed by Barry Warsaw in :gh:`148641`.) | ||
|
|
||
|
|
||
| .. _whatsnew315-improved-error-messages: | ||
|
|
||
| Improved error messages | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.