Skip to content

Commit eab653e

Browse files
authored
Merge branch 'main' into frozenset_immutable_tracking
2 parents 62afc76 + 9d34623 commit eab653e

38 files changed

+305
-128
lines changed

Doc/c-api/capsule.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Refer to :ref:`using-capsules` for more information on using these objects.
1515
.. c:type:: PyCapsule
1616
1717
This subtype of :c:type:`PyObject` represents an opaque value, useful for C
18-
extension modules who need to pass an opaque value (as a :c:expr:`void*`
18+
extension modules which need to pass an opaque value (as a :c:expr:`void*`
1919
pointer) through Python code to other C code. It is often used to make a C
2020
function pointer defined in one module available to other modules, so the
2121
regular import mechanism can be used to access C APIs defined in dynamically

Doc/c-api/code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ may change without deprecation warnings.
289289
290290
.. c:function:: Py_ssize_t PyUnstable_Eval_RequestCodeExtraIndex(freefunc free)
291291
292-
Return a new an opaque index value used to adding data to code objects.
292+
Return a new opaque index value used to adding data to code objects.
293293
294294
You generally call this function once (per interpreter) and use the result
295295
with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate

Doc/c-api/codec.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Codec registry and support functions
77
88
Register a new codec search function.
99
10-
As side effect, this tries to load the :mod:`!encodings` package, if not yet
10+
As a side effect, this tries to load the :mod:`!encodings` package, if not yet
1111
done, to make sure that it is always first in the list of search functions.
1212
1313
.. c:function:: int PyCodec_Unregister(PyObject *search_function)

Doc/c-api/module.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ Module Objects
102102
Return a pointer to the :c:type:`PyModuleDef` struct from which the module was
103103
created, or ``NULL`` if the module wasn't created from a definition.
104104
105+
On error, return ``NULL`` with an exception set.
106+
Use :c:func:`PyErr_Occurred` to tell this case apart from a mising
107+
:c:type:`!PyModuleDef`.
108+
105109
106110
.. c:function:: PyObject* PyModule_GetFilenameObject(PyObject *module)
107111

Doc/deprecations/pending-removal-in-3.20.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Pending removal in Python 3.20
88
- :mod:`argparse`
99
- :mod:`csv`
1010
- :mod:`!ctypes.macholib`
11+
- :mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)
1112
- :mod:`imaplib`
1213
- :mod:`ipaddress`
1314
- :mod:`json`

Doc/library/concurrent.futures.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ ThreadPoolExecutor Example
239239
InterpreterPoolExecutor
240240
-----------------------
241241

242+
.. versionadded:: 3.14
243+
242244
The :class:`InterpreterPoolExecutor` class uses a pool of interpreters
243245
to execute calls asynchronously. It is a :class:`ThreadPoolExecutor`
244246
subclass, which means each worker is running in its own thread.

Doc/library/decimal.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,16 @@ In addition to the three supplied contexts, new contexts can be created with the
15691569
Constants
15701570
---------
15711571

1572-
The constants in this section are only relevant for the C module. They
1572+
.. data:: SPEC_VERSION
1573+
1574+
The highest version of the General Decimal Arithmetic
1575+
Specification that this implementation complies with.
1576+
See https://speleotrove.com/decimal/decarith.html for the specification.
1577+
1578+
.. versionadded:: next
1579+
1580+
1581+
The following constants are only relevant for the C module. They
15731582
are also included in the pure Python version for compatibility.
15741583

15751584
+---------------------------------+---------------------+-------------------------------+

Doc/library/xmlrpc.client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ Convenience Functions
524524

525525
.. function:: dumps(params, methodname=None, methodresponse=None, encoding=None, allow_none=False)
526526

527-
Convert *params* into an XML-RPC request. or into a response if *methodresponse*
527+
Convert *params* into an XML-RPC request, or into a response if *methodresponse*
528528
is true. *params* can be either a tuple of arguments or an instance of the
529529
:exc:`Fault` exception class. If *methodresponse* is true, only a single value
530530
can be returned, meaning that *params* must be of length 1. *encoding*, if

Doc/whatsnew/3.15.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,7 @@ New deprecations
851851
- :mod:`argparse`
852852
- :mod:`csv`
853853
- :mod:`!ctypes.macholib`
854+
- :mod:`decimal` (use :data:`decimal.SPEC_VERSION` instead)
854855
- :mod:`imaplib`
855856
- :mod:`ipaddress`
856857
- :mod:`json`

Include/internal/pycore_freelist.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ extern "C" {
1717
static inline struct _Py_freelists *
1818
_Py_freelists_GET(void)
1919
{
20-
PyThreadState *tstate = _PyThreadState_GET();
2120
#ifdef Py_DEBUG
22-
_Py_EnsureTstateNotNULL(tstate);
21+
_Py_AssertHoldsTstate();
2322
#endif
2423

2524
#ifdef Py_GIL_DISABLED
25+
PyThreadState *tstate = _PyThreadState_GET();
2626
return &((_PyThreadStateImpl*)tstate)->freelists;
2727
#else
28-
return &tstate->interp->object_state.freelists;
28+
PyInterpreterState *interp = _PyInterpreterState_GET();
29+
return &interp->object_state.freelists;
2930
#endif
3031
}
3132

0 commit comments

Comments
 (0)