Skip to content

Commit a26dfa5

Browse files
generatedunixname1734921407115435meta-codesync[bot]
authored andcommitted
Sync pre-release CPython 3.15 branch from GitHub (2026-05-22)
Summary: Imported python/cpython `3.15.0b1+` from upstream rev [`081187f`](https://www.github.com/python/cpython/commit/081187f169556fb1b2d6a9b96f7b7e509f6ad985) (committed 2026-05-22 21:17:51+00:00). # Commit Info Base: (`3.15.0b1+`) - [`072246a`](https://www.github.com/python/cpython/commit/072246a7803246f562bea6d099d2c3640d59db96) (commit date: 2026-05-22 02:18:28+00:00) Imported: (`3.15.0b1+`) - [`081187f`](https://www.github.com/python/cpython/commit/081187f169556fb1b2d6a9b96f7b7e509f6ad985) (commit date: 2026-05-22 21:17:51+00:00) # Noteworthy file changes - Low-signal files (4 added) (NEWS.d, docs, .github) - Other files (1 added) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GAvaxCInS1TaaakIAByDXKrXqPUdbr0LAAAz Differential Revision: D106166459 fbshipit-source-id: 07d725211d428757c5d7b4d80f831f57c7924727
1 parent 1d58fc2 commit a26dfa5

40 files changed

Lines changed: 2336 additions & 2019 deletions

.github/workflows/reusable-macos.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ jobs:
3838
run: echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
3939
- name: Install Homebrew dependencies
4040
run: |
41-
brew install pkg-config openssl@3.5 xz gdbm tcl-tk@9 make
42-
# Because alternate versions are not symlinked into place by default:
43-
brew link --overwrite tcl-tk@9
41+
brew bundle --file=Misc/Brewfile
42+
brew install make
4443
- name: Configure CPython
4544
run: |
4645
MACOSX_DEPLOYMENT_TARGET=10.15 \

Doc/c-api/sentinel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ Sentinel objects
3131
3232
.. versionadded:: 3.15
3333
34-
.. c:function:: PyObject* PySentinel_New(const char *name, const char *module_name)
34+
.. c:function:: PyObject* PySentinel_New(const char *name, const char *module_name, const char *repr)
3535
3636
Return a new :class:`sentinel` object with :attr:`~sentinel.__name__` set to
3737
*name* and :attr:`~sentinel.__module__` set to *module_name*.
3838
*name* must not be ``NULL``. If *module_name* is ``NULL``, :attr:`~sentinel.__module__`
39-
is set to ``None``.
39+
is set to ``None``. If *repr* is ``NULL``, ``repr()`` returns :attr:`~sentinel.__name__`.
4040
Return ``NULL`` with an exception set on failure.
4141
4242
For pickling to work, *module_name* must be the name of an importable

Doc/data/python3.15.abi

Lines changed: 1092 additions & 1079 deletions
Large diffs are not rendered by default.

Doc/data/refcounts.dat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,7 @@ PySeqIter_New:PyObject*:seq:0:
20402040
PySentinel_New:PyObject*::+1:
20412041
PySentinel_New:const char*:name::
20422042
PySentinel_New:const char*:module_name::
2043+
PySentinel_New:const char*:repr::
20432044

20442045
PySequence_Check:int:::
20452046
PySequence_Check:PyObject*:o:0:

Doc/library/difflib.rst

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -728,18 +728,16 @@ Finally, we compare the two:
728728

729729
>>> from pprint import pprint
730730
>>> pprint(result)
731-
[
732-
' 1. Beautiful is better than ugly.\n',
733-
'- 2. Explicit is better than implicit.\n',
734-
'- 3. Simple is better than complex.\n',
735-
'+ 3. Simple is better than complex.\n',
736-
'? ++\n',
737-
'- 4. Complex is better than complicated.\n',
738-
'? ^ ---- ^\n',
739-
'+ 4. Complicated is better than complex.\n',
740-
'? ++++ ^ ^\n',
741-
'+ 5. Flat is better than nested.\n',
742-
]
731+
[' 1. Beautiful is better than ugly.\n',
732+
'- 2. Explicit is better than implicit.\n',
733+
'- 3. Simple is better than complex.\n',
734+
'+ 3. Simple is better than complex.\n',
735+
'? ++\n',
736+
'- 4. Complex is better than complicated.\n',
737+
'? ^ ---- ^\n',
738+
'+ 4. Complicated is better than complex.\n',
739+
'? ++++ ^ ^\n',
740+
'+ 5. Flat is better than nested.\n']
743741

744742
As a single multi-line string it looks like this:
745743

Doc/library/functions.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,15 +1827,21 @@ are always available. They are listed here in alphabetical order.
18271827
:func:`setattr`.
18281828

18291829

1830-
.. class:: sentinel(name, /)
1830+
.. class:: sentinel(name, /, *, repr=None)
18311831

18321832
Return a new unique sentinel object. *name* must be a :class:`str`, and is
1833-
used as the returned object's representation::
1833+
used by default as the returned object's representation::
18341834

18351835
>>> MISSING = sentinel("MISSING")
18361836
>>> MISSING
18371837
MISSING
18381838

1839+
The optional *repr* argument can be used to specify a different representation::
1840+
1841+
>>> MISSING = sentinel("MISSING", repr="<MISSING>")
1842+
>>> MISSING
1843+
<MISSING>
1844+
18391845
Sentinel objects are truthy and compare equal only to themselves. They are
18401846
intended to be compared with the :keyword:`is` operator.
18411847

@@ -1879,7 +1885,7 @@ are always available. They are listed here in alphabetical order.
18791885

18801886
.. attribute:: __module__
18811887

1882-
The name of the module where the sentinel was created.
1888+
The name of the module where the sentinel was created. This attribute is writable.
18831889

18841890
.. versionadded:: 3.15
18851891

Doc/library/gzip.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,13 @@ The module defines the following items:
108108
is no compression. The default is ``9``.
109109

110110
The optional *mtime* argument is the timestamp requested by gzip. The time
111-
is in Unix format, i.e., seconds since 00:00:00 UTC, January 1, 1970.
112-
If *mtime* is omitted or ``None``, the current time is used. Use *mtime* = 0
113-
to generate a compressed stream that does not depend on creation time.
111+
is in Unix format, i.e., seconds since 00:00:00 UTC, January 1, 1970. Set
112+
*mtime* to ``0`` to generate a compressed stream that does not depend on
113+
creation time. If *mtime* is omitted or ``None``, the current time is used;
114+
however, if the current time is outside the range 00:00:00 UTC, January 1,
115+
1970 through 06:28:15 UTC, February 7, 2106, or explicitly passed *mtime*
116+
argument is outside the range ``0`` to ``2**32-1``, then the value ``0``
117+
is used instead.
114118

115119
See below for the :attr:`mtime` attribute that is set when decompressing.
116120

0 commit comments

Comments
 (0)