Skip to content

Commit 612c628

Browse files
ambvmeta-codesync[bot]
authored andcommitted
Sync pre-release CPython 3.15 branch from GitHub (2026-06-29)
Summary: Imported python/cpython `3.15.0b3+dev` from upstream rev [`404113b`](https://www.github.com/python/cpython/commit/404113bd37625215d03545e51f8caa9fb7f1eea8) (committed 2026-06-29 02:34:20+00:00). # Commit Info - Base: (`3.15.0b3+dev`) - [`0290166`](https://www.github.com/python/cpython/commit/029016654ec08142f59d4f46113b3c1ec0830387) (commit date: 2026-06-26 23:31:46+00:00) - Imported: (`3.15.0b3+dev`) - [`404113b`](https://www.github.com/python/cpython/commit/404113bd37625215d03545e51f8caa9fb7f1eea8) (commit date: 2026-06-29 02:34:20+00:00) # Noteworthy file changes - Low-signal files (13 added) (NEWS.d, docs, .github) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GFSTOyRnpqSSPY8DABLcuAMJrccJbr0LAAAz Reviewed By: fried Differential Revision: D110015284 fbshipit-source-id: af9a090a36f40dc0efa3cbdf783f6912668d3650
1 parent d8921ac commit 612c628

70 files changed

Lines changed: 1592 additions & 264 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/type.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ but need extra remarks for use as slots:
639639
in the following situations:
640640
641641
- The base is not variable-sized (its
642-
:c:member:`~PyTypeObject.tp_itemsize`).
642+
:c:member:`~PyTypeObject.tp_itemsize` is zero).
643643
- The requested :c:member:`PyType_Spec.basicsize` is positive,
644644
suggesting that the memory layout of the base class is known.
645645
- The requested :c:member:`PyType_Spec.basicsize` is zero,

Doc/howto/curses.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ code, all the functions described here will probably be available. The older
5252
versions of curses carried by some proprietary Unixes may not support
5353
everything, though.
5454

55-
The Windows version of Python doesn't include the :mod:`curses`
56-
module. A ported version called :pypi:`UniCurses` is available.
55+
The Windows version of Python doesn't include the :mod:`curses` module.
56+
The third-party :pypi:`windows-curses` package provides the same interface on Windows.
5757

5858

5959
The Python curses module

Doc/library/curses.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,7 @@ Window objects
975975
.. method:: window.getbkgd()
976976

977977
Return the given window's current background character/attribute pair.
978+
Its components can be extracted like those of :meth:`inch`.
978979

979980

980981
.. method:: window.getch([y, x])
@@ -1065,8 +1066,10 @@ Window objects
10651066

10661067
.. method:: window.inch([y, x])
10671068

1068-
Return the character at the given position in the window. The bottom 8 bits are
1069-
the character proper, and upper bits are the attributes.
1069+
Return the character at the given position in the window.
1070+
The bottom 8 bits are the character proper and the upper bits are the attributes;
1071+
extract them with the :data:`A_CHARTEXT` and :data:`A_ATTRIBUTES` bit-masks,
1072+
and the color pair with :func:`pair_number`.
10701073

10711074

10721075
.. method:: window.insch(ch[, attr])

Doc/library/http.client.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ HTTPConnection Objects
433433

434434
The maximum number of allowed response headers to help prevent denial-of-service
435435
attacks. By default, the maximum number of allowed headers is set to 100.
436+
The same limit applies to the trailer section of a chunked response.
436437

437438
.. versionadded:: 3.15
438439

Doc/library/itertools.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ loops that truncate the stream.
197197
for iterable in iterables:
198198
yield from iterable
199199

200+
Note that :ref:`unpacking in comprehensions <unpacking-comprehensions>`
201+
provides similar functionality so that ``list(chain(p, q))`` could be
202+
written as ``[*s for s in (p, q)]``.
203+
200204

201205
.. classmethod:: chain.from_iterable(iterable)
202206

@@ -208,6 +212,10 @@ loops that truncate the stream.
208212
for iterable in iterables:
209213
yield from iterable
210214

215+
Note that :ref:`unpacking in comprehensions <unpacking-comprehensions>`
216+
provides similar functionality so that ``list(chain.from_iterable(iterables))``
217+
could be written as ``[*s for s in iterables]``.
218+
211219

212220
.. function:: combinations(iterable, r)
213221

Doc/library/tkinter.messagebox.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Common message box styles and layouts include but are not limited to:
113113
.. function:: askretrycancel(title=None, message=None, **options)
114114

115115
Ask if operation should be retried. Shows buttons :data:`RETRY` and :data:`CANCEL`.
116-
Return ``True`` if the answer is yes and ``False`` otherwise.
116+
Return ``True`` if the answer is retry and ``False`` otherwise.
117117

118118
.. function:: askyesno(title=None, message=None, **options)
119119

Doc/library/tkinter.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,8 @@ cursor
770770
The standard X cursor names from :file:`cursorfont.h` can be used, without the
771771
``XC_`` prefix. For example to get a hand cursor (``XC_hand2``), use the
772772
string ``"hand2"``. You can also specify a bitmap and mask file of your own.
773+
On Windows a cursor file (:file:`.cur` or :file:`.ani`) may be used directly,
774+
giving its path preceded with an ``@``, as in ``"@C:/cursors/bart.ani"``.
773775
See page 179 of Ousterhout's book.
774776

775777
distance
@@ -883,6 +885,20 @@ they are denoted in Tk, which can be useful when referring to the Tk man pages.
883885
| %d | detail | %D | delta |
884886
+----+---------------------+----+---------------------+
885887

888+
The ``add`` parameter above only affects the bindings you make yourself.
889+
Every widget also inherits *class bindings*
890+
that implement its standard behavior --
891+
for example a :class:`Text` widget binds :kbd:`Control-t`
892+
to transpose two characters.
893+
These are described in the bindings section of the widget's Tk man page
894+
(such as :manpage:`text(3tk)` or :manpage:`entry(3tk)`).
895+
896+
Class bindings are processed separately from your own,
897+
so binding an event yourself does not replace the default; both run.
898+
To suppress an unwanted default binding,
899+
bind the event on the widget
900+
and return the string ``"break"`` from your callback.
901+
886902

887903
The index parameter
888904
^^^^^^^^^^^^^^^^^^^

Doc/reference/expressions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,8 @@ appear directly in a class definition.
848848
``yield`` and ``yield from`` prohibited in the implicitly nested scope.
849849

850850

851+
.. _unpacking-comprehensions:
852+
851853
Unpacking in comprehensions
852854
^^^^^^^^^^^^^^^^^^^^^^^^^^^
853855

Include/cpython/pystate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ struct _ts {
143143
struct _PyInterpreterFrame *base_frame;
144144

145145
struct _PyInterpreterFrame *last_profiled_frame;
146+
uintptr_t last_profiled_frame_seq;
146147

147148
Py_tracefunc c_profilefunc;
148149
Py_tracefunc c_tracefunc;

Include/internal/pycore_debug_offsets.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ typedef struct _Py_DebugOffsets {
104104
uint64_t current_frame;
105105
uint64_t base_frame;
106106
uint64_t last_profiled_frame;
107+
uint64_t last_profiled_frame_seq;
107108
uint64_t thread_id;
108109
uint64_t native_thread_id;
109110
uint64_t datastack_chunk;
@@ -294,6 +295,7 @@ typedef struct _Py_DebugOffsets {
294295
.current_frame = offsetof(PyThreadState, current_frame), \
295296
.base_frame = offsetof(PyThreadState, base_frame), \
296297
.last_profiled_frame = offsetof(PyThreadState, last_profiled_frame), \
298+
.last_profiled_frame_seq = offsetof(PyThreadState, last_profiled_frame_seq), \
297299
.thread_id = offsetof(PyThreadState, thread_id), \
298300
.native_thread_id = offsetof(PyThreadState, native_thread_id), \
299301
.datastack_chunk = offsetof(PyThreadState, datastack_chunk), \

0 commit comments

Comments
 (0)