Skip to content

Commit a37153a

Browse files
generatedunixname1734921407115435meta-codesync[bot]
authored andcommitted
Import CPython 3.14.7+ stable branch (2026-08-06)
Summary: Imported python/cpython `3.14.7+` from upstream rev [`085fd75`](https://www.github.com/python/cpython/commit/085fd75cb2b0b2b16d640020835545b9988e63fb) (committed 2026-08-06 15:18:32+00:00). # Commit Info - Base: (`3.14.6+`) - [`1f574b1`](https://www.github.com/python/cpython/commit/1f574b1ce58067f9fdaad0b5ff9a3bfb87151e4c) (commit date: 2026-08-03 21:14:27+00:00) - Imported: (`3.14.7+`) - [`085fd75`](https://www.github.com/python/cpython/commit/085fd75cb2b0b2b16d640020835545b9988e63fb) (commit date: 2026-08-06 15:18:32+00:00) # Noteworthy file changes - Stdlib files (1 added, 1 removed) - Low-signal files (4 added, 211 removed) (NEWS.d, docs, .github) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GA1mfCcS9fJowcUDAGWPU_d-37wzbr0LAAAz Reviewed By: itamaro Differential Revision: D115117124 fbshipit-source-id: 0fc3e0da6c62854aef7e30688a34ddd9ea5c2612
1 parent de99186 commit a37153a

273 files changed

Lines changed: 4148 additions & 801 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Doc/c-api/frame.rst

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -269,29 +269,8 @@ Unless using :pep:`523`, you will not need this.
269269
* - .. c:macro:: PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR
270270
- The frame corresponds to a method on a class instance.
271271
272-
However, Python's C API lacks a function to read the executable kind from
273-
a frame. Instead, use this recipe:
274-
275-
.. code-block:: c
276-
277-
int
278-
get_executable_kind(PyFrameObject *frame)
279-
{
280-
_PyInterpreterFrame *f = frame->f_frame;
281-
PyObject *exec = PyStackRef_AsPyObjectBorrow(f->f_executable);
282-
283-
if (PyCode_Check(exec)) {
284-
return PyUnstable_EXECUTABLE_KIND_PY_FUNCTION;
285-
}
286-
if (PyMethod_Check(exec)) {
287-
return PyUnstable_EXECUTABLE_KIND_BUILTIN_FUNCTION;
288-
}
289-
if (Py_IS_TYPE(exec, &PyMethodDescr_Type)) {
290-
return PyUnstable_EXECUTABLE_KIND_METHOD_DESCRIPTOR;
291-
}
292-
293-
return PyUnstable_EXECUTABLE_KIND_SKIP;
294-
}
272+
Note that reading the executable kind from a frame is currently only
273+
possible with undocumented internal APIs.
295274
296275
.. versionadded:: 3.13
297276

Doc/c-api/init_config.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ Some options are read from the :mod:`sys` attributes. For example, the option
623623
624624
.. versionadded:: 3.14
625625
626-
.. versionchanged:: next
626+
.. versionchanged:: 3.14.7
627627
The function now replaces :data:`sys.flags` (create a new object),
628628
instead of modifying :data:`sys.flags` in-place.
629629

Doc/library/asyncio-stream.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,16 @@ StreamWriter
382382
be resumed. When there is nothing to wait for, the :meth:`drain`
383383
returns immediately.
384384

385+
.. note::
386+
387+
When the write buffer is below the high watermark,
388+
:meth:`drain` returns immediately without yielding to
389+
the event loop. As a result, code which repeatedly calls
390+
``write()`` followed by ``await drain()`` may prevent other
391+
tasks from running. To prevent blocking behavior, yield
392+
to the event loop explicitly with ``await asyncio.sleep(0)``
393+
(see :func:`asyncio.sleep`).
394+
385395
.. method:: start_tls(sslcontext, *, server_hostname=None, \
386396
ssl_handshake_timeout=None, ssl_shutdown_timeout=None)
387397
:async:

Doc/library/concurrent.futures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ in a REPL or a lambda should not be expected to work.
421421
require the *fork* start method for :class:`ProcessPoolExecutor` you must
422422
explicitly pass ``mp_context=multiprocessing.get_context("fork")``.
423423

424-
.. versionchanged:: next
424+
.. versionchanged:: 3.14.7
425425
Fixed a deadlock (:gh:`115634`) where the executor could hang after
426426
a worker process exited upon reaching its *max_tasks_per_child*
427427
limit while tasks remained queued.

Doc/library/datetime.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,11 +1531,11 @@ Instance methods:
15311531
returned by :func:`time.time`.
15321532

15331533
Naive :class:`.datetime` instances are assumed to represent local
1534-
time and this method relies on the platform C :c:func:`mktime`
1535-
function to perform the conversion. Since :class:`!datetime`
1536-
supports wider range of values than :c:func:`mktime` on many
1537-
platforms, this method may raise :exc:`OverflowError` or :exc:`OSError`
1538-
for times far in the past or far in the future.
1534+
time and this method relies on platform C functions to perform
1535+
the conversion. Since :class:`!datetime` supports a wider range of
1536+
values than the platform C functions on many platforms, this
1537+
method may raise :exc:`OverflowError` or :exc:`OSError` for times
1538+
far in the past or far in the future.
15391539

15401540
For aware :class:`.datetime` instances, the return value is computed
15411541
as::
@@ -1562,6 +1562,10 @@ Instance methods:
15621562
The :meth:`timestamp` method uses the :attr:`.fold` attribute to
15631563
disambiguate the times during a repeated interval.
15641564

1565+
.. versionchanged:: 3.6
1566+
This method no longer relies on the platform C :c:func:`mktime`
1567+
function to perform conversions.
1568+
15651569

15661570
.. method:: datetime.weekday()
15671571

Doc/library/test.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ The :mod:`!test.support` module defines the following functions:
965965

966966
.. currentmodule:: test.support.isolation
967967

968-
.. decorator:: runInSubprocess()
968+
.. decorator:: runInSubprocess(*, options=(), env=None, timeout=None)
969969

970970
Decorator that runs the decorated test in a fresh interpreter subprocess, in
971971
isolation, so that it does not share global or interpreter state with the
@@ -999,6 +999,19 @@ The :mod:`!test.support` module defines the following functions:
999999
:func:`~test.support.bigmemtest` and the like behave consistently in both
10001000
processes.
10011001

1002+
*options* is a sequence of interpreter command line options
1003+
to run the subprocess with,
1004+
and *env* is a mapping of environment variables to set in it,
1005+
on top of the inherited environment.
1006+
A value of ``None`` in *env* unsets the variable.
1007+
Note that :option:`-E` and :option:`-I` make the subprocess ignore
1008+
the ``PYTHON*`` environment variables, including :envvar:`PYTHONPATH`.
1009+
1010+
*timeout* is the number of seconds to wait for the subprocess;
1011+
the test is reported as an error if it does not complete in time.
1012+
By default there is no timeout,
1013+
and a hung test is left to the timeout of the test runner.
1014+
10021015
The test is skipped on platforms without subprocess support.
10031016

10041017

Doc/tools/templates/indexcontent.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,16 @@ <h1>{{ docstitle|e }}</h1>
8282
<p><strong>{% trans %}Other resources:{% endtrans %}</strong></p>
8383
<div class="contentstable">
8484
<ul>
85+
<li class="biglink"><a class="biglink" href="https://devguide.python.org">{% trans %}Python developer's guide{% endtrans %}</a><br>
86+
<span class="linkdescr">{% trans %}Information on contributing to Python{% endtrans %}</span></li>
8587
<li class="biglink"><a class="biglink" href="https://packaging.python.org">{% trans %}Python Packaging User Guide{% endtrans %}</a><br>
8688
<span class="linkdescr">{% trans %}Resources relating to Python packaging{% endtrans %}</span></li>
89+
<li class="biglink"><a class="biglink" href="https://www.python.org/doc/av/">{% trans %}Audio/visual talks{% endtrans %}</a><br>
90+
<span class="linkdescr">{% trans %}Podcasts, talks, and video presentations from the community{% endtrans %}</span></li>
8791
</ul>
8892
<ul>
93+
<li class="biglink"><a class="biglink" href="https://peps.python.org/">{% trans %}Python Enhancement Proposals{% endtrans %}</a><br>
94+
<span class="linkdescr">{% trans %}Index of proposed improvements to Python{% endtrans %}</span></li>
8995
<li class="biglink"><a class="biglink" href="https://typing.python.org">{% trans %}Static Typing with Python{% endtrans %}</a><br>
9096
<span class="linkdescr">{% trans %}Information and guides about Python type safety{% endtrans %}</span></li>
9197
</ul>

Doc/tools/templates/indexsidebar.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,3 @@ <h3>{% trans %}Docs by version{% endtrans %}</h3>
66
{% include "_docs_by_version.html" without context %}
77
<li><a href="https://www.python.org/doc/versions/">{% trans %}All versions{% endtrans %}</a></li>
88
</ul>
9-
<h3>{% trans %}Other resources{% endtrans %}</h3>
10-
<ul>
11-
{# XXX: many of these should probably be merged in the main docs #}
12-
<li><a href="https://peps.python.org/">{% trans %}PEP index{% endtrans %}</a></li>
13-
<li><a href="https://wiki.python.org/moin/BeginnersGuide">{% trans %}Beginner's guide{% endtrans %}</a></li>
14-
<li><a href="https://wiki.python.org/moin/PythonBooks">{% trans %}Book list{% endtrans %}</a></li>
15-
<li><a href="https://www.python.org/doc/av/">{% trans %}Audio/visual talks{% endtrans %}</a></li>
16-
<li><a href="https://devguide.python.org/">{% trans %}Python developer’s guide{% endtrans %}</a></li>
17-
</ul>

Include/patchlevel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
/*--start constants--*/
2020
#define PY_MAJOR_VERSION 3
2121
#define PY_MINOR_VERSION 14
22-
#define PY_MICRO_VERSION 6
22+
#define PY_MICRO_VERSION 7
2323
#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL
2424
#define PY_RELEASE_SERIAL 0
2525

2626
/* Version as a string */
27-
#define PY_VERSION "3.14.6+meta"
27+
#define PY_VERSION "3.14.7+meta"
2828
/*--end constants--*/
2929

3030

Lib/_pydecimal.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,9 +1821,10 @@ def __round__(self, n=None):
18211821
Decimal('123.46')
18221822
>>> round(Decimal('123.456'), -2)
18231823
Decimal('1E+2')
1824-
>>> round(Decimal('-Infinity'), 37)
1824+
>>> with localcontext(ExtendedContext):
1825+
... round(Decimal('-Infinity'), 37)
1826+
... round(Decimal('sNaN123'), 0)
18251827
Decimal('NaN')
1826-
>>> round(Decimal('sNaN123'), 0)
18271828
Decimal('NaN123')
18281829
18291830
"""

0 commit comments

Comments
 (0)