Skip to content

Commit da6789b

Browse files
Merge branch 'main' into gh-159041-asyncio-task-finalizer
2 parents 4947080 + 32fd69b commit da6789b

1,231 files changed

Lines changed: 16433 additions & 4626 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.

‎.github/dependabot.yml‎

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ updates:
2828
cooldown:
2929
default-days: 14
3030

31+
- package-ecosystem: "npm"
32+
directory: "/Platforms/emscripten/browser_test/"
33+
schedule:
34+
interval: "quarterly"
35+
labels: ["OS-emscripten", "skip issue", "skip news"]
36+
groups:
37+
npm:
38+
patterns: ["*"]
39+
cooldown:
40+
default-days: 14
41+
3142
# Release branches: Dependabot only reads this file from the default
3243
# branch, so each branch that should get its own actions bumps needs an
3344
# entry here with `target-branch`. Add one when a new release branch is
@@ -118,14 +129,28 @@ updates:
118129
cooldown:
119130
default-days: 14
120131

121-
- package-ecosystem: "pip"
122-
target-branch: "3.13"
123-
directory: "/Tools/"
132+
# Only bump bugfix branches for npm. Remove
133+
# the entry when branch goes security-only.
134+
- package-ecosystem: "npm"
135+
target-branch: "3.15"
136+
directory: "/Platforms/emscripten/browser_test/"
124137
schedule:
125138
interval: "quarterly"
126-
labels: ["skip issue", "skip news"]
139+
labels: ["OS-emscripten", "skip issue", "skip news"]
127140
groups:
128-
pip:
141+
npm:
142+
patterns: ["*"]
143+
cooldown:
144+
default-days: 14
145+
146+
- package-ecosystem: "npm"
147+
target-branch: "3.14"
148+
directory: "/Platforms/emscripten/browser_test/"
149+
schedule:
150+
interval: "quarterly"
151+
labels: ["OS-emscripten", "skip issue", "skip news"]
152+
groups:
153+
npm:
129154
patterns: ["*"]
130155
cooldown:
131156
default-days: 14

‎Doc/builtins/functions.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ are always available. They are listed here in alphabetical order.
110110

111111
.. versionadded:: 3.10
112112

113-
.. versionchanged:: next
113+
.. versionchanged:: 3.16
114114
Added the *stop_value* and *stop_exception* parameters.
115115

116116
.. function:: all(iterable, /)
@@ -1241,7 +1241,7 @@ are always available. They are listed here in alphabetical order.
12411241
for item in iter(input_queue.get_nowait, stop_exception=queue.Empty):
12421242
process_item(item)
12431243

1244-
.. versionchanged:: next
1244+
.. versionchanged:: 3.16
12451245
Added the *stop_exception* parameter
12461246
and allowed passing *stop_value* by keyword.
12471247

‎Doc/builtins/stdtypes.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5254,7 +5254,7 @@ copying.
52545254
.. versionchanged:: 3.5
52555255
The source format is no longer restricted when casting to a byte view.
52565256

5257-
.. versionchanged:: next
5257+
.. versionchanged:: 3.16
52585258
Casting a multi-dimensional F-contiguous view to a one-dimensional
52595259
view is now supported.
52605260

@@ -5331,7 +5331,7 @@ copying.
53315331

53325332
.. versionadded:: 3.3
53335333

5334-
.. versionchanged:: next
5334+
.. versionchanged:: 3.16
53355335
Added the *order* parameter.
53365336

53375337
.. attribute:: readonly

‎Doc/c-api/capsule.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
119119
.. versionchanged:: 3.3
120120
*no_block* has no effect anymore.
121121
122-
.. versionchanged:: next
122+
.. versionchanged:: 3.16
123123
Submodules are now imported if needed.
124124
125125

‎Doc/c-api/complex.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,5 +198,5 @@ the :ref:`Number Protocol <number>` API or use native complex types, like
198198
199199
.. deprecated:: 3.15
200200
201-
.. versionchanged:: next
201+
.. versionchanged:: 3.16
202202
This function leaves :c:data:`errno` unchanged on success.

‎Doc/c-api/import.rst‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,10 @@ Importing Modules
417417
(Custom importers should do this in their
418418
:py:meth:`~importlib.abc.Loader.exec_module` method.)
419419
420+
If the spec's name is dotted and *initfunc* creates the module using only
421+
the last component of the name, the module's :attr:`~module.__name__`
422+
is set to the full name from the spec.
423+
420424
On error, return NULL with an exception set.
421425
422426
.. versionadded:: 3.15

‎Doc/c-api/init_config.rst‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Error Handling
123123
Python 3.16. Instead, the option is now processed in :c:func:`Py_RunMain`.
124124
This function became useless.
125125
126-
.. deprecated:: next
126+
.. deprecated:: 3.16
127127
128128
129129
Get Options
@@ -247,7 +247,7 @@ Initialize Python
247247
* Return ``0`` on success.
248248
* Set an error in *config* and return ``-1`` on error.
249249
250-
.. versionchanged:: next
250+
.. versionchanged:: 3.16
251251
The function no longer sets an exit code if a command line option wants
252252
to exit Python. Instead, the option is now processed in
253253
:c:func:`Py_RunMain`.
@@ -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.16
627627
The function now replaces :data:`sys.flags` (create a new object),
628628
instead of modifying :data:`sys.flags` in-place.
629629
@@ -755,7 +755,7 @@ PyStatus
755755
756756
Exit code. Argument passed to ``exit()``.
757757
758-
.. deprecated:: next
758+
.. deprecated:: 3.16
759759
760760
.. c:member:: const char *err_msg
761761
@@ -787,7 +787,7 @@ PyStatus
787787
788788
Exit Python with the specified exit code.
789789
790-
.. deprecated:: next
790+
.. deprecated:: 3.16
791791
:c:func:`Py_InitializeFromConfig` no longer sets an exit code if a
792792
command line option wants to exit Python. Instead, the option is
793793
now processed in :c:func:`Py_RunMain`.
@@ -807,7 +807,7 @@ PyStatus
807807
808808
Is the result an exit?
809809
810-
.. deprecated:: next
810+
.. deprecated:: 3.16
811811
:c:func:`Py_InitializeFromConfig` no longer sets an exit code if a
812812
command line option wants to exit Python. Instead, the option is
813813
now processed in :c:func:`Py_RunMain`.

‎Doc/c-api/interp-lifecycle.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Initializing and finalizing the interpreter
127127
interpreter, populating the runtime configuration structure, and querying
128128
the returned status structure.
129129
130-
.. versionchanged:: next
130+
.. versionchanged:: 3.16
131131
The function no longer returns an exit code if a command line option
132132
wants to exit Python. Instead, the option is processed in
133133
:c:func:`Py_RunMain`.

‎Doc/c-api/marshal.rst‎

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The following exceptions can be raised by these functions:
2424
:exc:`KeyboardInterrupt` if reading or writing is interrupted by a signal,
2525
and :exc:`MemoryError` if memory allocation fails.
2626

27-
.. versionchanged:: next
27+
.. versionchanged:: 3.16
2828
Previously, in functions taking a :c:expr:`FILE*`,
2929
the reading functions raised :exc:`EOFError`
3030
instead of :exc:`OSError` and :exc:`KeyboardInterrupt`,
@@ -43,14 +43,40 @@ and :exc:`MemoryError` if memory allocation fails.
4343
This function can fail, in which case it sets the error indicator.
4444
Use :c:func:`PyErr_Occurred` to check for that.
4545
46+
.. note::
47+
48+
In Python 3.15 and earlier, this function does not set the error
49+
indicator if writing to *file* fails.
50+
The same caveat applies as for :c:func:`PyMarshal_WriteObjectToFile`.
51+
4652
.. c:function:: void PyMarshal_WriteObjectToFile(PyObject *value, FILE *file, int version)
4753
4854
Marshal a Python object, *value*, to *file*.
4955
*version* indicates the file format.
5056
57+
The marshalled representation of *value* is built in memory
58+
and then written to *file*.
59+
Nothing is written if *value* cannot be marshalled.
60+
5161
This function can fail, in which case it sets the error indicator.
5262
Use :c:func:`PyErr_Occurred` to check for that.
5363
64+
.. note::
65+
66+
In Python 3.15 and earlier, this function can write only part of the
67+
data to *file* and return without setting the error indicator, for
68+
example if *value* contains an object which cannot be marshalled or
69+
if writing to *file* fails (see :gh:`155907`).
70+
Code which has to support these versions cannot rely on
71+
:c:func:`PyErr_Occurred` alone to know that all the data was written.
72+
It can use :c:func:`PyMarshal_WriteObjectToString` and write the
73+
result itself, or validate what was written.
74+
75+
.. versionchanged:: 3.16
76+
Previously, the data was written to *file* as it was produced,
77+
using a buffer of constant size,
78+
and incomplete data was written if *value* could not be marshalled.
79+
5480
.. c:function:: PyObject* PyMarshal_WriteObjectToString(PyObject *value, int version)
5581
5682
Return a bytes object containing the marshalled representation of *value*.

‎Doc/c-api/unicode.rst‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,7 +1945,7 @@ Python does not always check these requirements.
19451945
19461946
.. versionadded:: 3.3
19471947
1948-
.. soft-deprecated:: next
1948+
.. soft-deprecated:: 3.16
19491949
See :ref:`pyunicode-new-mutating`.
19501950
19511951
@@ -1968,7 +1968,7 @@ Python does not always check these requirements.
19681968
19691969
.. versionadded:: 3.3
19701970
1971-
.. soft-deprecated:: next
1971+
.. soft-deprecated:: 3.16
19721972
Use the :c:type:`PyUnicodeWriter` API instead.
19731973
19741974
@@ -1988,7 +1988,7 @@ Python does not always check these requirements.
19881988
19891989
.. versionadded:: 3.3
19901990
1991-
.. soft-deprecated:: next
1991+
.. soft-deprecated:: 3.16
19921992
Use the :c:type:`PyUnicodeWriter` API instead.
19931993
19941994
@@ -2009,7 +2009,7 @@ Python does not always check these requirements.
20092009
*\*unicode* must not be "used" yet.
20102010
See :ref:`pyunicode-new-mutating` for details.
20112011
2012-
.. soft-deprecated:: next
2012+
.. soft-deprecated:: 3.16
20132013
Use the :c:type:`PyUnicodeWriter` API instead.
20142014
20152015
@@ -2030,7 +2030,7 @@ Python does not always check these requirements.
20302030
20312031
.. versionadded:: 3.3
20322032
2033-
.. soft-deprecated:: next
2033+
.. soft-deprecated:: 3.16
20342034
Use the :c:type:`PyUnicodeWriter` API instead.
20352035
20362036
@@ -2050,5 +2050,5 @@ Python does not always check these requirements.
20502050
20512051
.. versionadded:: 3.3
20522052
2053-
.. soft-deprecated:: next
2053+
.. soft-deprecated:: 3.16
20542054
Use the :c:type:`PyUnicodeWriter` API instead.

0 commit comments

Comments
 (0)