Skip to content

Commit 519dca2

Browse files
generatedunixname1734921407115435meta-codesync[bot]
authored andcommitted
Import CPython 3.15.1+dev stable branch (2026-10-23)
Summary: Imported python/cpython `3.15.1+dev` from upstream rev [`45f5b00`](https://www.github.com/python/cpython/commit/45f5b00a9a6e9921ef74cd9ef28acb5b86cafa73) (committed 2026-10-23 01:33:45+00:00). # Commit Info - Base: (`3.15.1+dev`) - [`ae62786`](https://www.github.com/python/cpython/commit/ae62786a27d2f7a37bbc09073742595c5db0453e) (commit date: 2026-10-22 04:24:40+00:00) - Imported: (`3.15.1+dev`) - [`45f5b00`](https://www.github.com/python/cpython/commit/45f5b00a9a6e9921ef74cd9ef28acb5b86cafa73) (commit date: 2026-10-23 01:33:45+00:00) # Noteworthy file changes - Native files (5 added): ``` + Include/internal/mimalloc/mimalloc-stats.h + Objects/mimalloc/arena-abandon.c + Objects/mimalloc/free.c + Objects/mimalloc/libc.c + Objects/mimalloc/prim/emscripten/prim.c ``` - Low-signal files (29 added) (NEWS.d, docs, .github) Complete list of added/removed files: https://www.internalfb.com/intern/everpaste/?color=0&handle=GMF8rDFCJTZH6FkGABT1SzsYsAJfbr0LAAAz Reviewed By: itamaro Differential Revision: D127084950 fbshipit-source-id: f27056f55caeed803b245053f8073a5d85c33566
1 parent 10563cb commit 519dca2

153 files changed

Lines changed: 8650 additions & 3681 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/README.rst‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ tree but are maintained separately and are available from
2121
* `Sphinx <https://pypi.org/project/Sphinx/>`_
2222
* `blurb <https://pypi.org/project/blurb/>`_
2323
* `python-docs-theme <https://pypi.org/project/python-docs-theme/>`_
24+
* `sphinx-linklint <https://pypi.org/project/sphinx-linklint/>`_
2425

2526
The easiest way to install these tools is to create a virtual environment and
2627
install the tools into there.
@@ -57,6 +58,8 @@ Available make targets are:
5758
* "venv", which creates a virtual environment with all necessary tools
5859
installed.
5960

61+
* "lock", which regenerates the pinned dependencies in ``pylock.toml``.
62+
6063
* "html", which builds standalone HTML files for offline viewing.
6164

6265
* "htmlview", which re-uses the "html" builder, but then opens the main page
@@ -79,6 +82,9 @@ Available make targets are:
7982

8083
* "text", which builds a plain text file for each source file.
8184

85+
* "texinfo", which builds Texinfo source files as input to ``makeinfo`` to
86+
produce Info documents.
87+
8288
* "epub", which builds an EPUB document, suitable to be viewed on e-book
8389
readers.
8490

@@ -97,6 +103,10 @@ Available make targets are:
97103
plain text documentation for the labels defined in
98104
``tools/pyspecific.py`` -- pydoc needs these to show topic and keyword help.
99105

106+
* "doctest", which runs doctests in the documentation.
107+
108+
* "gettext", which generates gettext message catalog templates.
109+
100110
* "check", which checks for frequent markup errors.
101111

102112
* "dist", (Unix only) which creates distributable archives of HTML, text,

‎Doc/library/argparse.rst‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,9 @@ how the command-line arguments should be handled. The supplied actions are:
789789
>>> parser.parse_args('--foo --bar'.split())
790790
Namespace(foo=True, bar=False, baz=True)
791791

792+
These defaults apply when the options are absent. They can be overridden
793+
by default_ or argument_default_.
794+
792795
* ``'append'`` - This appends each argument value to a list.
793796
It is useful for allowing an option to be specified multiple times.
794797
If the default value is a non-empty list, the parsed value will start
@@ -1012,10 +1015,8 @@ default
10121015

10131016
All optional arguments and some positional arguments may be omitted at the
10141017
command line. The ``default`` keyword argument of
1015-
:meth:`~ArgumentParser.add_argument`, whose value defaults to ``None``,
1016-
specifies what value should be used if the command-line argument is not present.
1017-
For optional arguments, the ``default`` value is used when the option string
1018-
was not present at the command line::
1018+
:meth:`~ArgumentParser.add_argument` specifies what value should be used if the
1019+
command-line argument is not present. For example::
10191020

10201021
>>> parser = argparse.ArgumentParser()
10211022
>>> parser.add_argument('--foo', default=42)
@@ -1024,6 +1025,11 @@ was not present at the command line::
10241025
>>> parser.parse_args([])
10251026
Namespace(foo=42)
10261027

1028+
If ``default`` is omitted, :meth:`~ArgumentParser.add_argument` uses a value
1029+
previously set for the dest_ with :meth:`~ArgumentParser.set_defaults`, or
1030+
otherwise a non-``None`` argument_default_. If neither is set, the action's
1031+
own default is used.
1032+
10271033
If the target namespace already has an attribute set, the action *default*
10281034
will not overwrite it::
10291035

‎Doc/library/curses.rst‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,11 @@ The module :mod:`!curses` defines the following functions:
302302

303303
Used for half-delay mode, which is similar to cbreak mode in that characters
304304
typed by the user are immediately available to the program. However, after
305-
blocking for *tenths* tenths of seconds, raise an exception if nothing has
306-
been typed. The value of *tenths* must be a number between ``1`` and ``255``. Use
307-
:func:`nocbreak` to leave half-delay mode.
305+
blocking for *tenths* tenths of seconds, if nothing has been typed,
306+
:meth:`~window.getch` returns ``-1``, while :meth:`~window.getkey` and
307+
:meth:`~window.get_wch` raise :exc:`curses.error`.
308+
The value of *tenths* must be a number between ``1`` and ``255``.
309+
Use :func:`nocbreak` to leave half-delay mode.
308310

309311

310312
.. function:: init_color(color_number, r, g, b)
@@ -639,8 +641,10 @@ The module :mod:`!curses` defines the following functions:
639641

640642
.. function:: termname()
641643

642-
Return the value of the environment variable :envvar:`TERM`, as a bytes object,
643-
truncated to 14 characters.
644+
Return the name of the terminal in use, as a bytes object.
645+
This is the name passed to :func:`setupterm`,
646+
or the value of the :envvar:`TERM` environment variable if none was given.
647+
Some curses libraries truncate it to 14 characters.
644648

645649

646650
.. function:: tigetflag(capname)
@@ -1148,7 +1152,8 @@ Window objects
11481152
Insert character *ch* with attributes *attr* before the character under the
11491153
cursor, or at ``(y, x)`` if specified. All characters to the right of the
11501154
cursor are shifted one position right, with the rightmost character on the
1151-
line being lost. The cursor position does not change.
1155+
line being lost.
1156+
The cursor position does not change (after moving to *y*, *x*, if specified).
11521157

11531158

11541159
.. method:: window.insdelln(nlines)
@@ -1170,8 +1175,8 @@ Window objects
11701175
window.insnstr(y, x, str, n[, attr])
11711176

11721177
Insert a character string (as many characters as will fit on the line) before
1173-
the character under the cursor, up to *n* characters. If *n* is zero or
1174-
negative, the entire string is inserted. All characters to the right of the
1178+
the character under the cursor, up to *n* characters. If *n* is negative,
1179+
the entire string is inserted. All characters to the right of the
11751180
cursor are shifted right, with the rightmost characters on the line being lost.
11761181
The cursor position does not change (after moving to *y*, *x*, if specified).
11771182

@@ -1345,8 +1350,9 @@ Window objects
13451350
.. method:: window.scroll([lines=1])
13461351

13471352
Scroll the screen or scrolling region. Scroll upward by *lines* lines if
1348-
*lines* is positive, or downward if it is negative. Scrolling has no effect
1349-
unless it has been enabled for the window with :meth:`scrollok`.
1353+
*lines* is positive, or downward if it is negative.
1354+
Raise :exc:`curses.error` unless scrolling has been enabled for the window
1355+
with :meth:`scrollok`.
13501356

13511357

13521358
.. method:: window.scrollok(flag)

‎Doc/library/datetime.rst‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,12 @@ Objects of the :class:`date` type are always naive.
180180

181181
An object of type :class:`.time` or :class:`.datetime` may be aware or naive.
182182

183-
A :class:`.datetime` object ``d`` is aware if both of the following hold:
184-
185-
1. ``d.tzinfo`` is not ``None``
186-
2. ``d.tzinfo.utcoffset(d)`` does not return ``None``
187-
183+
A :class:`.datetime` object ``d`` is aware if
184+
:meth:`d.utcoffset() <datetime.utcoffset>` does not return ``None``.
188185
Otherwise, ``d`` is naive.
189186

190-
A :class:`.time` object ``t`` is aware if both of the following hold:
191-
192-
1. ``t.tzinfo`` is not ``None``
193-
2. ``t.tzinfo.utcoffset(None)`` does not return ``None``.
194-
187+
A :class:`.time` object ``t`` is aware if
188+
:meth:`t.utcoffset() <time.utcoffset>` does not return ``None``.
195189
Otherwise, ``t`` is naive.
196190

197191
The distinction between aware and naive doesn't apply to :class:`timedelta`

‎Doc/library/dis.rst‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,10 +1433,14 @@ iterations of the loop.
14331433
.. opcode:: LOAD_GLOBAL (namei)
14341434

14351435
Loads the global named ``co_names[namei>>1]`` onto the stack.
1436+
If the low bit of ``namei`` is set, a ``NULL`` is pushed onto the stack
1437+
after the global variable.
14361438

14371439
.. versionchanged:: 3.11
1438-
If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the
1439-
stack before the global variable.
1440+
The low bit of ``namei`` indicates whether a ``NULL`` is pushed.
1441+
1442+
.. versionchanged:: 3.13
1443+
The ``NULL`` is pushed after the global variable, rather than before it.
14401444

14411445
.. opcode:: LOAD_FAST (var_num)
14421446

‎Doc/library/gzip.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ The module defines the following items:
105105
The *compresslevel* argument is an integer from ``0`` to ``9`` controlling
106106
the level of compression; ``1`` is fastest and produces the least
107107
compression, and ``9`` is slowest and produces the most compression. ``0``
108-
is no compression. The default is ``9``.
108+
is no compression. The default is ``6``.
109109

110110
The optional *mtime* argument is the timestamp requested by gzip. The time
111111
is in Unix format, i.e., seconds since 00:00:00 UTC, January 1, 1970. Set

‎Doc/library/tarfile.rst‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,6 +1114,11 @@ reused in custom filters:
11141114
- :ref:`Refuse <tarfile-extraction-refuse>` to extract files whose absolute
11151115
path (after following symlinks) would end up outside the destination.
11161116
This raises :class:`~tarfile.OutsideDestinationError`.
1117+
- :ref:`Refuse <tarfile-extraction-refuse>` to extract links (hard or soft)
1118+
whose name refers to the destination directory itself.
1119+
This raises :class:`~tarfile.OutsideDestinationError`.
1120+
Note that such files are refused even on platforms that do not support
1121+
symbolic links.
11171122
- Clear high mode bits (setuid, setgid, sticky) and group/other write bits
11181123
(:const:`~stat.S_IWGRP` | :const:`~stat.S_IWOTH`).
11191124

‎Doc/license.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ mimalloc
10331033

10341034
MIT License::
10351035

1036-
Copyright (c) 2018-2021 Microsoft Corporation, Daan Leijen
1036+
Copyright (c) 2018-2025 Microsoft Corporation, Daan Leijen
10371037

10381038
Permission is hereby granted, free of charge, to any person obtaining a copy
10391039
of this software and associated documentation files (the "Software"), to deal

‎Doc/using/android.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ much easier experience:
3333
* `Briefcase <https://briefcase.beeware.org>`__, from the BeeWare project
3434
* `Buildozer <https://buildozer.readthedocs.io>`__, from the Kivy project
3535
* `Chaquopy <https://chaquo.com/chaquopy>`__
36+
* `Flet <https://flet.dev/>`__
3637
* `pyqtdeploy <https://www.riverbankcomputing.com/static/Docs/pyqtdeploy/>`__
3738
* `Termux <https://termux.dev/en/>`__
3839

‎Doc/using/ios.rst‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ your Python code is then packaged as a standalone bundle that can be
2525
distributed via the iOS App Store.
2626

2727
If you're looking to experiment for the first time with writing an iOS app in
28-
Python, projects such as `BeeWare <https://beeware.org>`__ and `Kivy
29-
<https://kivy.org>`__ will provide a much more approachable user experience.
28+
Python, projects such as `BeeWare <https://beeware.org>`__, `Kivy
29+
<https://kivy.org>`__, and `Flet <https://flet.dev/>`__ will provide a much more
30+
approachable user experience.
3031
These projects manage the complexities associated with getting an iOS project
3132
running, so you only need to deal with the Python code itself.
3233

0 commit comments

Comments
 (0)