Skip to content

Commit f14b4f8

Browse files
authored
Merge branch 'main' into bugfix/SDX-12236-configure-std-c11
2 parents b4fbd36 + bfac7d2 commit f14b4f8

File tree

109 files changed

+1966
-2378
lines changed

Some content is hidden

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

109 files changed

+1966
-2378
lines changed

.github/CODEOWNERS

+6-1
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/workflows/mypy.yml

-2
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/import.rst

-13
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,6 @@ Importing Modules
1616
This is a wrapper around :c:func:`PyImport_Import()` which takes a
1717
:c:expr:`const char *` as an argument instead of a :c:expr:`PyObject *`.
1818
19-
.. c:function:: PyObject* PyImport_ImportModuleNoBlock(const char *name)
20-
21-
This function is a deprecated alias of :c:func:`PyImport_ImportModule`.
22-
23-
.. versionchanged:: 3.3
24-
This function used to fail immediately when the import lock was held
25-
by another thread. In Python 3.3 though, the locking scheme switched
26-
to per-module locks for most purposes, so this function's special
27-
behaviour isn't needed anymore.
28-
29-
.. deprecated-removed:: 3.13 3.15
30-
Use :c:func:`PyImport_ImportModule` instead.
31-
3219
3320
.. c:function:: PyObject* PyImport_ImportModuleEx(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist)
3421

Doc/data/refcounts.dat

-3
Original file line numberDiff line numberDiff line change
@@ -1093,9 +1093,6 @@ PyImport_ImportModuleLevelObject:PyObject*:locals:0:???
10931093
PyImport_ImportModuleLevelObject:PyObject*:fromlist:0:???
10941094
PyImport_ImportModuleLevelObject:int:level::
10951095

1096-
PyImport_ImportModuleNoBlock:PyObject*::+1:
1097-
PyImport_ImportModuleNoBlock:const char*:name::
1098-
10991096
PyImport_ReloadModule:PyObject*::+1:
11001097
PyImport_ReloadModule:PyObject*:m:0:
11011098

Doc/data/stable_abi.dat

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Doc/deprecations/c-api-pending-removal-in-3.15.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Pending removal in Python 3.15
22
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33

44
* The bundled copy of ``libmpdecimal``.
5-
* The :c:func:`PyImport_ImportModuleNoBlock`:
5+
* The :c:func:`!PyImport_ImportModuleNoBlock`:
66
Use :c:func:`PyImport_ImportModule` instead.
77
* :c:func:`PyWeakref_GetObject` and :c:func:`PyWeakref_GET_OBJECT`:
88
Use :c:func:`PyWeakref_GetRef` instead. The `pythoncapi-compat project

Doc/library/concurrent.futures.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
.. versionadded:: 3.2
88

9-
**Source code:** :source:`Lib/concurrent/futures/thread.py`
10-
and :source:`Lib/concurrent/futures/process.py`
9+
**Source code:** :source:`Lib/concurrent/futures/thread.py`,
10+
:source:`Lib/concurrent/futures/process.py`,
11+
and :source:`Lib/concurrent/futures/interpreter.py`
1112

1213
--------------
1314

Doc/library/functools.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,7 @@ The :mod:`functools` module defines the following functions:
403403
>>> remove_first_dear(message)
404404
'Hello, dear world!'
405405

406-
:data:`!Placeholder` has no special treatment when used in a keyword
407-
argument to :func:`!partial`.
406+
:data:`!Placeholder` cannot be passed to :func:`!partial` as a keyword argument.
408407

409408
.. versionchanged:: 3.14
410409
Added support for :data:`Placeholder` in positional arguments.

Doc/library/heapq-binary-tree.svg

+211
Loading

Doc/library/heapq.rst

+4-10
Original file line numberDiff line numberDiff line change
@@ -312,17 +312,11 @@ elements are considered to be infinite. The interesting property of a heap is
312312
that ``a[0]`` is always its smallest element.
313313

314314
The strange invariant above is meant to be an efficient memory representation
315-
for a tournament. The numbers below are *k*, not ``a[k]``::
315+
for a tournament. The numbers below are *k*, not ``a[k]``:
316316

317-
0
318-
319-
1 2
320-
321-
3 4 5 6
322-
323-
7 8 9 10 11 12 13 14
324-
325-
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
317+
.. figure:: heapq-binary-tree.svg
318+
:align: center
319+
:alt: Example (min-heap) binary tree.
326320

327321
In the tree above, each cell *k* is topping ``2*k+1`` and ``2*k+2``. In a usual
328322
binary tournament we see in sports, each cell is the winner over the two cells

Doc/library/sqlite3.rst

+21-31
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@ Reference
259259
Module functions
260260
^^^^^^^^^^^^^^^^
261261

262-
.. function:: connect(database, timeout=5.0, detect_types=0, \
262+
.. function:: connect(database, *, timeout=5.0, detect_types=0, \
263263
isolation_level="DEFERRED", check_same_thread=True, \
264264
factory=sqlite3.Connection, cached_statements=128, \
265-
uri=False, *, \
265+
uri=False, \
266266
autocommit=sqlite3.LEGACY_TRANSACTION_CONTROL)
267267

268268
Open a connection to an SQLite database.
@@ -355,11 +355,8 @@ Module functions
355355
.. versionchanged:: 3.12
356356
Added the *autocommit* parameter.
357357

358-
.. versionchanged:: 3.13
359-
Positional use of the parameters *timeout*, *detect_types*,
360-
*isolation_level*, *check_same_thread*, *factory*, *cached_statements*,
361-
and *uri* is deprecated.
362-
They will become keyword-only parameters in Python 3.15.
358+
.. versionchanged:: 3.15
359+
All parameters except *database* are now keyword-only.
363360

364361
.. function:: complete_statement(statement)
365362

@@ -693,7 +690,7 @@ Connection objects
693690
:meth:`~Cursor.executescript` on it with the given *sql_script*.
694691
Return the new cursor object.
695692

696-
.. method:: create_function(name, narg, func, *, deterministic=False)
693+
.. method:: create_function(name, narg, func, /, *, deterministic=False)
697694

698695
Create or remove a user-defined SQL function.
699696

@@ -719,6 +716,9 @@ Connection objects
719716
.. versionchanged:: 3.8
720717
Added the *deterministic* parameter.
721718

719+
.. versionchanged:: 3.15
720+
The first three parameters are now positional-only.
721+
722722
Example:
723723

724724
.. doctest::
@@ -733,13 +733,8 @@ Connection objects
733733
('acbd18db4cc2f85cedef654fccc4a4d8',)
734734
>>> con.close()
735735

736-
.. versionchanged:: 3.13
737-
738-
Passing *name*, *narg*, and *func* as keyword arguments is deprecated.
739-
These parameters will become positional-only in Python 3.15.
740-
741736

742-
.. method:: create_aggregate(name, n_arg, aggregate_class)
737+
.. method:: create_aggregate(name, n_arg, aggregate_class, /)
743738

744739
Create or remove a user-defined SQL aggregate function.
745740

@@ -763,6 +758,9 @@ Connection objects
763758
Set to ``None`` to remove an existing SQL aggregate function.
764759
:type aggregate_class: :term:`class` | None
765760

761+
.. versionchanged:: 3.15
762+
All three parameters are now positional-only.
763+
766764
Example:
767765

768766
.. testcode::
@@ -792,11 +790,6 @@ Connection objects
792790

793791
3
794792

795-
.. versionchanged:: 3.13
796-
797-
Passing *name*, *n_arg*, and *aggregate_class* as keyword arguments is deprecated.
798-
These parameters will become positional-only in Python 3.15.
799-
800793

801794
.. method:: create_window_function(name, num_params, aggregate_class, /)
802795

@@ -937,7 +930,7 @@ Connection objects
937930
Aborted queries will raise an :exc:`OperationalError`.
938931

939932

940-
.. method:: set_authorizer(authorizer_callback)
933+
.. method:: set_authorizer(authorizer_callback, /)
941934

942935
Register :term:`callable` *authorizer_callback* to be invoked
943936
for each attempt to access a column of a table in the database.
@@ -962,12 +955,11 @@ Connection objects
962955
.. versionchanged:: 3.11
963956
Added support for disabling the authorizer using ``None``.
964957

965-
.. versionchanged:: 3.13
966-
Passing *authorizer_callback* as a keyword argument is deprecated.
967-
The parameter will become positional-only in Python 3.15.
958+
.. versionchanged:: 3.15
959+
The only parameter is now positional-only.
968960

969961

970-
.. method:: set_progress_handler(progress_handler, n)
962+
.. method:: set_progress_handler(progress_handler, /, n)
971963

972964
Register :term:`callable` *progress_handler* to be invoked for every *n*
973965
instructions of the SQLite virtual machine. This is useful if you want to
@@ -981,12 +973,11 @@ Connection objects
981973
currently executing query and cause it to raise a :exc:`DatabaseError`
982974
exception.
983975

984-
.. versionchanged:: 3.13
985-
Passing *progress_handler* as a keyword argument is deprecated.
986-
The parameter will become positional-only in Python 3.15.
976+
.. versionchanged:: 3.15
977+
The first parameter is now positional-only.
987978

988979

989-
.. method:: set_trace_callback(trace_callback)
980+
.. method:: set_trace_callback(trace_callback, /)
990981

991982
Register :term:`callable` *trace_callback* to be invoked
992983
for each SQL statement that is actually executed by the SQLite backend.
@@ -1009,9 +1000,8 @@ Connection objects
10091000

10101001
.. versionadded:: 3.3
10111002

1012-
.. versionchanged:: 3.13
1013-
Passing *trace_callback* as a keyword argument is deprecated.
1014-
The parameter will become positional-only in Python 3.15.
1003+
.. versionchanged:: 3.15
1004+
The first parameter is now positional-only.
10151005

10161006

10171007
.. method:: enable_load_extension(enabled, /)

Doc/library/stdtypes.rst

+28-27
Original file line numberDiff line numberDiff line change
@@ -4823,7 +4823,13 @@ can be used interchangeably to index the same dictionary entry.
48234823
being added is already present, the value from the keyword argument
48244824
replaces the value from the positional argument.
48254825

4826-
To illustrate, the following examples all return a dictionary equal to
4826+
Providing keyword arguments as in the first example only works for keys that
4827+
are valid Python identifiers. Otherwise, any valid keys can be used.
4828+
4829+
Dictionaries compare equal if and only if they have the same ``(key,
4830+
value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', '>') raise
4831+
:exc:`TypeError`. To illustrate dictionary creation and equality,
4832+
the following examples all return a dictionary equal to
48274833
``{"one": 1, "two": 2, "three": 3}``::
48284834

48294835
>>> a = dict(one=1, two=2, three=3)
@@ -4838,6 +4844,27 @@ can be used interchangeably to index the same dictionary entry.
48384844
Providing keyword arguments as in the first example only works for keys that
48394845
are valid Python identifiers. Otherwise, any valid keys can be used.
48404846

4847+
Dictionaries preserve insertion order. Note that updating a key does not
4848+
affect the order. Keys added after deletion are inserted at the end. ::
4849+
4850+
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
4851+
>>> d
4852+
{'one': 1, 'two': 2, 'three': 3, 'four': 4}
4853+
>>> list(d)
4854+
['one', 'two', 'three', 'four']
4855+
>>> list(d.values())
4856+
[1, 2, 3, 4]
4857+
>>> d["one"] = 42
4858+
>>> d
4859+
{'one': 42, 'two': 2, 'three': 3, 'four': 4}
4860+
>>> del d["two"]
4861+
>>> d["two"] = None
4862+
>>> d
4863+
{'one': 42, 'three': 3, 'four': 4, 'two': None}
4864+
4865+
.. versionchanged:: 3.7
4866+
Dictionary order is guaranteed to be insertion order. This behavior was
4867+
an implementation detail of CPython from 3.6.
48414868

48424869
These are the operations that dictionaries support (and therefore, custom
48434870
mapping types should support too):
@@ -5008,32 +5035,6 @@ can be used interchangeably to index the same dictionary entry.
50085035

50095036
.. versionadded:: 3.9
50105037

5011-
Dictionaries compare equal if and only if they have the same ``(key,
5012-
value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', '>') raise
5013-
:exc:`TypeError`.
5014-
5015-
Dictionaries preserve insertion order. Note that updating a key does not
5016-
affect the order. Keys added after deletion are inserted at the end. ::
5017-
5018-
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}
5019-
>>> d
5020-
{'one': 1, 'two': 2, 'three': 3, 'four': 4}
5021-
>>> list(d)
5022-
['one', 'two', 'three', 'four']
5023-
>>> list(d.values())
5024-
[1, 2, 3, 4]
5025-
>>> d["one"] = 42
5026-
>>> d
5027-
{'one': 42, 'two': 2, 'three': 3, 'four': 4}
5028-
>>> del d["two"]
5029-
>>> d["two"] = None
5030-
>>> d
5031-
{'one': 42, 'three': 3, 'four': 4, 'two': None}
5032-
5033-
.. versionchanged:: 3.7
5034-
Dictionary order is guaranteed to be insertion order. This behavior was
5035-
an implementation detail of CPython from 3.6.
5036-
50375038
Dictionaries and dictionary views are reversible. ::
50385039

50395040
>>> d = {"one": 1, "two": 2, "three": 3, "four": 4}

0 commit comments

Comments
 (0)