Skip to content

Commit 5ddf0ed

Browse files
authored
Merge branch 'main' into issue-133403
2 parents a63dcfd + 8679c8d commit 5ddf0ed

File tree

459 files changed

+12990
-4322
lines changed

Some content is hidden

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

459 files changed

+12990
-4322
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,12 @@ Lib/test/test_interpreters/ @ericsnowcurrently
298298
**/*-ios* @freakboy3742
299299

300300
# WebAssembly
301-
/Tools/wasm/ @brettcannon @freakboy3742
301+
Tools/wasm/config.site-wasm32-emscripten @freakboy3742
302+
/Tools/wasm/README.md @brettcannon @freakboy3742
303+
/Tools/wasm/wasi-env @brettcannon
304+
/Tools/wasm/wasi.py @brettcannon
305+
/Tools/wasm/emscripten @freakboy3742
306+
/Tools/wasm/wasi @brettcannon
302307

303308
# SBOM
304309
/Misc/externals.spdx.json @sethmlarson

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ body:
4040
- "3.12"
4141
- "3.13"
4242
- "3.14"
43+
- "3.15"
4344
- "CPython main branch"
4445
validations:
4546
required: true

.github/ISSUE_TEMPLATE/crash.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ body:
3333
- "3.12"
3434
- "3.13"
3535
- "3.14"
36+
- "3.15"
3637
- "CPython main branch"
3738
validations:
3839
required: true

.github/workflows/mypy.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ on:
1919
- "Tools/jit/**"
2020
- "Tools/peg_generator/**"
2121
- "Tools/requirements-dev.txt"
22-
- "Tools/wasm/**"
2322
workflow_dispatch:
2423

2524
permissions:
@@ -51,7 +50,6 @@ jobs:
5150
"Tools/clinic",
5251
"Tools/jit",
5352
"Tools/peg_generator",
54-
"Tools/wasm",
5553
]
5654
steps:
5755
- uses: actions/checkout@v4

Doc/c-api/arg.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ small to receive the value.
274274
Convert a Python integer to a C :c:expr:`unsigned long` without
275275
overflow checking.
276276

277-
.. versionchanged:: next
277+
.. versionchanged:: 3.14
278278
Use :meth:`~object.__index__` if available.
279279

280280
``L`` (:class:`int`) [long long]
@@ -284,7 +284,7 @@ small to receive the value.
284284
Convert a Python integer to a C :c:expr:`unsigned long long`
285285
without overflow checking.
286286

287-
.. versionchanged:: next
287+
.. versionchanged:: 3.14
288288
Use :meth:`~object.__index__` if available.
289289

290290
``n`` (:class:`int`) [:c:type:`Py_ssize_t`]
@@ -380,10 +380,10 @@ Other objects
380380
The *converter* for the ``O&`` format unit in *items* must not store
381381
a borrowed buffer or a borrowed reference.
382382

383-
.. versionchanged:: next
383+
.. versionchanged:: 3.14
384384
:class:`str` and :class:`bytearray` objects no longer accepted as a sequence.
385385

386-
.. deprecated:: next
386+
.. deprecated:: 3.14
387387
Non-tuple sequences are deprecated if *items* contains format units
388388
which store a borrowed buffer or a borrowed reference.
389389

@@ -396,7 +396,7 @@ Other objects
396396
If the argument is not ``None``, it is parsed according to the specified
397397
format unit.
398398

399-
.. versionadded:: next
399+
.. versionadded:: 3.14
400400

401401
A few other characters have a meaning in a format string. These may not occur
402402
inside nested parentheses. They are:

Doc/c-api/init_config.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Configuration Options
363363
- Read-only
364364
* - ``"import_time"``
365365
- :c:member:`import_time <PyConfig.import_time>`
366-
- ``bool``
366+
- ``int``
367367
- Read-only
368368
* - ``"inspect"``
369369
- :c:member:`inspect <PyConfig.inspect>`
@@ -1477,13 +1477,19 @@ PyConfig
14771477
14781478
.. c:member:: int import_time
14791479
1480-
If non-zero, profile import time.
1480+
If ``1``, profile import time.
1481+
If ``2``, include additional output that indicates
1482+
when an imported module has already been loaded.
14811483
1482-
Set the ``1`` by the :option:`-X importtime <-X>` option and the
1484+
Set by the :option:`-X importtime <-X>` option and the
14831485
:envvar:`PYTHONPROFILEIMPORTTIME` environment variable.
14841486
14851487
Default: ``0``.
14861488
1489+
.. versionchanged:: 3.14
1490+
1491+
Added support for ``import_time = 2``
1492+
14871493
.. c:member:: int inspect
14881494
14891495
Enter interactive mode after executing a script or a command.

Doc/c-api/object.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,3 +737,21 @@ Object Protocol
737737
caller must hold a :term:`strong reference` to *obj* when calling this.
738738
739739
.. versionadded:: 3.14
740+
741+
.. c:function:: int PyUnstable_Object_IsUniquelyReferenced(PyObject *op)
742+
743+
Determine if *op* only has one reference.
744+
745+
On GIL-enabled builds, this function is equivalent to
746+
:c:expr:`Py_REFCNT(op) == 1`.
747+
748+
On a :term:`free threaded <free threading>` build, this checks if *op*'s
749+
:term:`reference count` is equal to one and additionally checks if *op*
750+
is only used by this thread. :c:expr:`Py_REFCNT(op) == 1` is **not**
751+
thread-safe on free threaded builds; prefer this function.
752+
753+
The caller must hold an :term:`attached thread state`, despite the fact
754+
that this function doesn't call into the Python interpreter. This function
755+
cannot fail.
756+
757+
.. versionadded:: 3.14

Doc/c-api/refcounting.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ of Python objects.
2323
2424
Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count.
2525
26-
See also the function :c:func:`PyUnstable_Object_IsUniqueReferencedTemporary()`.
26+
.. note::
27+
28+
On :term:`free threaded <free threading>` builds of Python, returning 1
29+
isn't sufficient to determine if it's safe to treat *o* as having no
30+
access by other threads. Use :c:func:`PyUnstable_Object_IsUniquelyReferenced`
31+
for that instead.
32+
33+
See also the function :c:func:`PyUnstable_Object_IsUniqueReferencedTemporary()`.
2734
2835
.. versionchanged:: 3.10
2936
:c:func:`Py_REFCNT()` is changed to the inline static function.

Doc/deprecations/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Deprecations
77

88
.. include:: pending-removal-in-3.17.rst
99

10+
.. include:: pending-removal-in-3.19.rst
11+
1012
.. include:: pending-removal-in-future.rst
1113

1214
C API deprecations
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Pending removal in Python 3.19
2+
------------------------------
3+
4+
* :mod:`ctypes`:
5+
6+
* Implicitly switching to the MSVC-compatible struct layout by setting
7+
:attr:`~ctypes.Structure._pack_` but not :attr:`~ctypes.Structure._layout_`
8+
on non-Windows platforms.

0 commit comments

Comments
 (0)