Skip to content

Commit 19ddbde

Browse files
Merge branch 'main' into gh-159689-processpool-mid-send
2 parents eb434c5 + 75d96f8 commit 19ddbde

60 files changed

Lines changed: 435 additions & 227 deletions

Some content is hidden

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

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Modules/Setup.config
102102
Modules/Setup.local
103103
Modules/Setup.stdlib
104104
Modules/config.c
105+
Modules/config_bootstrap.c
105106
Modules/ld_so_aix
106107
Programs/_freeze_module
107108
Programs/_testembed

‎Doc/c-api/bytes.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ Variant using a pointer to compute the final size::
494494
495495
char *str = PyBytesWriter_GetData(writer);
496496
memcpy(str, "abc", 3);
497-
str += 1;
497+
str += 3;
498498
return PyBytesWriter_FinishWithPointer(writer, str);
499499
}
500500
@@ -543,7 +543,7 @@ Update ``_PyBytes_Resize()`` code
543543
544544
Example of code using the soft deprecated ``_PyBytes_Resize()`` API::
545545
546-
void create_string(Py_ssize_t size)
546+
PyObject* create_string(Py_ssize_t size)
547547
{
548548
PyObject *bytes = PyBytes_FromStringAndSize(NULL, size);
549549
if (bytes == NULL) {
@@ -561,7 +561,7 @@ Example of code using the soft deprecated ``_PyBytes_Resize()`` API::
561561
562562
It can now be updated to::
563563
564-
void create_string(Py_ssize_t size)
564+
PyObject* create_string(Py_ssize_t size)
565565
{
566566
PyBytesWriter *writer = PyBytesWriter_Create(size);
567567
if (writer == NULL) {

‎Doc/c-api/call.rst‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,17 @@ This is a pointer to a function with the following signature:
8181
8282
- *callable* is the object being called.
8383
- *args* is a C array consisting of the positional arguments followed by the
84-
values of the keyword arguments.
85-
This can be *NULL* if there are no arguments.
84+
values of the keyword arguments.
85+
This can be *NULL* if there are no arguments.
8686
- *nargsf* is the number of positional arguments plus possibly the
87-
:c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag.
88-
To get the actual number of positional arguments from *nargsf*,
89-
use :c:func:`PyVectorcall_NARGS`.
87+
:c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag.
88+
To get the actual number of positional arguments from *nargsf*,
89+
use :c:func:`PyVectorcall_NARGS`.
9090
- *kwnames* is a tuple containing the names of the keyword arguments;
91-
in other words, the keys of the kwargs dict.
92-
These names must be strings (instances of ``str`` or a subclass)
93-
and they must be unique.
94-
If there are no keyword arguments, then *kwnames* can instead be *NULL*.
91+
in other words, the keys of the kwargs dict.
92+
These names must be strings (instances of ``str`` or a subclass)
93+
and they must be unique.
94+
If there are no keyword arguments, then *kwnames* can instead be *NULL*.
9595

9696
.. c:macro:: PY_VECTORCALL_ARGUMENTS_OFFSET
9797

‎Doc/c-api/datetime.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ the module initialisation function. The macro puts a pointer to a C structure
1313
into a static variable, :c:data:`PyDateTimeAPI`, that is used by the following
1414
macros.
1515

16-
.. c:macro:: PyDateTime_IMPORT()
16+
.. c:macro:: PyDateTime_IMPORT
1717
1818
Import the datetime C API.
1919

@@ -51,7 +51,7 @@ macros.
5151
.. versionchanged:: 3.15
5252

5353
This variable should not be accessed directly as direct access is not thread-safe.
54-
Use :c:func:`PyDateTime_IMPORT` instead.
54+
Use :c:macro:`PyDateTime_IMPORT` instead.
5555

5656
.. c:type:: PyDateTime_Date
5757

‎Doc/c-api/function.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ There are a few functions specific to Python functions.
193193
194194
.. versionadded:: 3.12
195195
196-
- ``PyFunction_PYFUNC_EVENT_MODIFY_QUALNAME``
196+
- ``PyFunction_EVENT_MODIFY_QUALNAME``
197197
198198
.. versionadded:: 3.15
199199

‎Doc/c-api/init_config.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ Example::
840840
if (PyStatus_Exception(status)) {
841841
Py_ExitStatusException(status);
842842
}
843-
PyMem_Free(ptr);
843+
PyMem_RawFree(ptr);
844844
return 0;
845845
}
846846

‎Doc/conf.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
print("It may be removed in the future\n")
320320

321321
# Short title used e.g. for <title> HTML tags.
322-
html_short_title = f'{release} Documentation'
322+
html_short_title = f'{release} documentation'
323323

324324
# Deployment preview information
325325
# (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html)

‎Doc/deprecations/c-api-pending-removal-in-3.18.rst‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ Pending removal in Python 3.18
3131
replace ``_PyUnicodeWriter_WriteSubstring(&writer, str, start, end)`` with
3232
:c:func:`PyUnicodeWriter_WriteSubstring(writer, str, start, end) <PyUnicodeWriter_WriteSubstring>`.
3333
* :c:func:`!_PyUnicodeWriter_WriteASCIIString`:
34-
replace ``_PyUnicodeWriter_WriteASCIIString(&writer, str)`` with
35-
:c:func:`PyUnicodeWriter_WriteASCII(writer, str) <PyUnicodeWriter_WriteASCII>`.
34+
replace ``_PyUnicodeWriter_WriteASCIIString(&writer, str, size)`` with
35+
:c:func:`PyUnicodeWriter_WriteASCII(writer, str, size) <PyUnicodeWriter_WriteASCII>`.
3636
* :c:func:`!_PyUnicodeWriter_WriteLatin1String`:
37-
replace ``_PyUnicodeWriter_WriteLatin1String(&writer, str)`` with
38-
:c:func:`PyUnicodeWriter_WriteUTF8(writer, str) <PyUnicodeWriter_WriteUTF8>`.
37+
replace ``_PyUnicodeWriter_WriteLatin1String(&writer, str, size)`` by
38+
decoding the string with :c:func:`PyUnicode_DecodeLatin1`, writing the
39+
result with :c:func:`PyUnicodeWriter_WriteStr`, and releasing the result
40+
with :c:func:`Py_DECREF`.
3941
* :c:func:`!_PyUnicodeWriter_Prepare`: (no replacement).
4042
* :c:func:`!_PyUnicodeWriter_PrepareKind`: (no replacement).
4143
* :c:func:`!_Py_HashPointer`: use :c:func:`Py_HashPointer`.

‎Doc/howto/functional.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ Two of Python's built-in functions, :func:`map` and :func:`filter` duplicate the
628628
features of generator expressions:
629629

630630
:func:`map(f, iterA, iterB, ...) <map>` returns an iterator over the sequence
631-
``f(iterA[0], iterB[0]), f(iterA[1], iterB[1]), f(iterA[2], iterB[2]), ...``.
631+
``f(iterA[0], iterB[0]), f(iterA[1], iterB[1]), f(iterA[2], iterB[2]), ...``.
632632

633633
>>> def upper(s):
634634
... return s.upper()

‎Doc/howto/mro.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ straightforward to compute the linearizations of O, X, Y, A and B:
348348

349349
.. code-block:: text
350350
351-
L[O] = 0
351+
L[O] = O
352352
L[X] = X O
353353
L[Y] = Y O
354354
L[A] = A X Y O

0 commit comments

Comments
 (0)