@@ -81,6 +81,7 @@ Summary -- Release highlights
8181 <whatsnew315-unpacking-in-comprehensions>`
8282* :pep: `686 `: :ref: `Python now uses UTF-8 as the default encoding
8383 <whatsnew315-utf8-default>`
84+ * :pep: `829 `: :ref: `Package startup configuration files <whatsnew315-startup-files >`
8485* :pep: `728 `: :ref: `TypedDict with typed extra items <whatsnew315-typeddict >`
8586* :pep: `747 `: :ref: `Annotating type forms with TypeForm
8687 <whatsnew315-typeform>`
@@ -94,7 +95,6 @@ Summary -- Release highlights
9495* :ref: `Improved error messages <whatsnew315-improved-error-messages >`
9596* :ref: `The official Windows 64-bit binaries now use the tail-calling interpreter
9697 <whatsnew315-windows-tail-calling-interpreter>`
97- * :pep: `829 `: Package Startup Configuration Files
9898
9999New features
100100============
@@ -452,6 +452,31 @@ agen() for x in a)``.
452452
453453(Contributed by Adam Hartz in :gh: `143055 `.)
454454
455+ .. _whatsnew315-startup-files :
456+
457+ :pep: `829 `: Package startup configuration files
458+ -----------------------------------------------
459+
460+ Loaded by the :mod: `site ` module when ``-S `` is not given, :ref: `.pth files <site-pth-files >`
461+ can contain lines that both extend :data: `sys.path ` and execute arbitrary code
462+ when the line starts with ``import `` (followed by a space or tab). The latter
463+ functionality can be problematic, since it is difficult to know exactly what
464+ gets executed when Python starts up.
465+
466+ As a step towards improving the ability to audit pre-start executable code,
467+ Python 3.15 introduces :ref: `.start files <site-start-files >` which contain entry point
468+ specifications of the form ``pkg.mod:callable `` where ``pkg.mod `` is the
469+ import path to the given callable. When Python starts up, the callable is
470+ located and called with no arguments.
471+
472+ ``import `` lines in :file: `.pth ` files are silently deprecated. When a
473+ matching :file: `.start ` file is found, ``import `` lines in :file: `.pth ` files
474+ are ignored. There is no change to :data: `sys.path ` extension lines in
475+ :file: `.pth ` files.
476+
477+ (Contributed by Barry Warsaw in :gh: `148641 `.)
478+
479+
455480.. _whatsnew315-abi3t :
456481
457482:pep: `803 ` -- Stable ABI for Free-Threaded Builds
@@ -627,6 +652,11 @@ Other language changes
627652
628653 (Contributed by Adam Turner in :gh: `133711 `; PEP 686 written by Inada Naoki.)
629654
655+ * The interpreter help (such as ``python --help ``) is now in color.
656+ This can be controlled by :ref: `environment variables
657+ <using-on-controlling-color>`.
658+ (Contributed by Hugo van Kemenade in :gh: `148766 `.)
659+
630660* Unraisable exceptions are now highlighted with color by default. This can be
631661 controlled by :ref: `environment variables <using-on-controlling-color >`.
632662 (Contributed by Peter Bierma in :gh: `134170 `.)
@@ -1663,13 +1693,31 @@ wave
16631693(Contributed by Lionel Koenig and Michiel W. Beijen in :gh: `60729 `.)
16641694
16651695
1696+ webbrowser
1697+ ----------
1698+
1699+ * On macOS, the new :class: `!webbrowser.MacOS ` class opens URLs via
1700+ :program: `/usr/bin/open ` instead of constructing and executing AppleScript
1701+ via :program: `osascript `. The default browser is detected from the
1702+ LaunchServices preferences file using :mod: `plistlib `, with
1703+ :class: `!com.apple.Safari ` as the fallback on fresh installations.
1704+ For non-HTTP(S) URLs, :program: `open -b <bundle-id> ` is used to route the
1705+ URL through a browser rather than the OS file handler, preventing
1706+ file injection attacks.
1707+ (Contributed by Jeff Lyon in :gh: `137586 `.)
1708+
1709+
16661710xml
16671711---
16681712
16691713* Add the :func: `xml.is_valid_name ` function, which allows to check
16701714 whether a string can be used as an element or attribute name in XML.
16711715 (Contributed by Serhiy Storchaka in :gh: `139489 `.)
16721716
1717+ * Add the :func: `xml.is_valid_text ` function, which allows to check
1718+ whether a string can be used in the XML document.
1719+ (Contributed by Serhiy Storchaka in :gh: `139489 `.)
1720+
16731721
16741722xml.parsers.expat
16751723-----------------
@@ -2059,6 +2107,13 @@ New deprecations
20592107 (Contributed by kishorhange111 in :gh: `148849 `.)
20602108
20612109
2110+ * :mod: `imaplib `:
2111+
2112+ * Altering :attr: `IMAP4.file <imaplib.IMAP4.file> ` is now deprecated
2113+ and slated for removal in Python 3.19. This property is now unused
2114+ and changing its value does *not * explicitly close the current file.
2115+
2116+
20622117* :mod: `re `:
20632118
20642119 * :func: `re.match ` and :meth: `re.Pattern.match ` are now
@@ -2102,6 +2157,12 @@ New deprecations
21022157 merely imported or accessed from the :mod: `!typing ` module.
21032158
21042159
2160+ * :mod: `webbrowser `:
2161+
2162+ * :class: `!webbrowser.MacOSXOSAScript ` is deprecated in favour of
2163+ :class: `!webbrowser.MacOS ` and scheduled for removal in Python 3.17.
2164+ (Contributed by Jeff Lyon in :gh: `137586 `.)
2165+
21052166* ``__version__ ``
21062167
21072168 * The ``__version__ ``, ``version `` and ``VERSION `` attributes have been
@@ -2291,6 +2352,11 @@ New features
22912352 Python 3.14.
22922353 (Contributed by Victor Stinner in :gh: `142417 `.)
22932354
2355+ * Add :c:func: `PyUnstable_DumpTraceback ` and
2356+ :c:func: `PyUnstable_DumpTracebackThreads ` functions to output Python
2357+ stacktraces.
2358+ (Contributed by Alex Malyshev in :gh: `145559 `.)
2359+
22942360Changed C APIs
22952361--------------
22962362
0 commit comments