Skip to content

Commit 4b11cf8

Browse files
authored
Merge branch 'main' into tuple-fold-cfg
2 parents 967a18e + 54efe29 commit 4b11cf8

File tree

125 files changed

+16009
-18761
lines changed

Some content is hidden

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

125 files changed

+16009
-18761
lines changed

Doc/c-api/monitoring.rst

+12
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,15 @@ would typically correspond to a python function.
196196
.. c:function:: int PyMonitoring_ExitScope(void)
197197
198198
Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`.
199+
200+
201+
.. c:function:: int PY_MONITORING_IS_INSTRUMENTED_EVENT(uint8_t ev)
202+
203+
Return true if the event corresponding to the event ID *ev* is
204+
a :ref:`local event <monitoring-event-local>`.
205+
206+
.. versionadded:: 3.13
207+
208+
.. deprecated:: next
209+
210+
This function is :term:`soft deprecated`.

Doc/c-api/typeobj.rst

+3-5
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ PyTypeObject Definition
473473
-----------------------
474474

475475
The structure definition for :c:type:`PyTypeObject` can be found in
476-
:file:`Include/object.h`. For convenience of reference, this repeats the
476+
:file:`Include/cpython/object.h`. For convenience of reference, this repeats the
477477
definition found there:
478478

479479
.. XXX Drop this?
@@ -2154,15 +2154,13 @@ and :c:data:`PyType_Type` effectively act as defaults.)
21542154
static void
21552155
local_finalize(PyObject *self)
21562156
{
2157-
PyObject *error_type, *error_value, *error_traceback;
2158-
21592157
/* Save the current exception, if any. */
2160-
PyErr_Fetch(&error_type, &error_value, &error_traceback);
2158+
PyObject *exc = PyErr_GetRaisedException();
21612159

21622160
/* ... */
21632161

21642162
/* Restore the saved exception. */
2165-
PyErr_Restore(error_type, error_value, error_traceback);
2163+
PyErr_SetRaisedException(exc);
21662164
}
21672165

21682166
**Inheritance:**

Doc/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
'issue_role',
3434
'lexers',
3535
'misc_news',
36+
'pydoc_topics',
3637
'pyspecific',
3738
'sphinx.ext.coverage',
3839
'sphinx.ext.doctest',

Doc/library/graphlib.rst

+8
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@
106106
function, the graph cannot be modified, and therefore no more nodes can be
107107
added using :meth:`~TopologicalSorter.add`.
108108

109+
A :exc:`ValueError` will be raised if the sort has been started by
110+
:meth:`~.static_order` or :meth:`~.get_ready`.
111+
112+
.. versionchanged:: next
113+
114+
``prepare()`` can now be called more than once as long as the sort has
115+
not started. Previously this raised :exc:`ValueError`.
116+
109117
.. method:: is_active()
110118

111119
Returns ``True`` if more progress can be made and ``False`` otherwise.

Doc/library/stdtypes.rst

+2
Original file line numberDiff line numberDiff line change
@@ -5244,6 +5244,8 @@ list is non-exhaustive.
52445244
* :class:`set`
52455245
* :class:`frozenset`
52465246
* :class:`type`
5247+
* :class:`asyncio.Future`
5248+
* :class:`asyncio.Task`
52475249
* :class:`collections.deque`
52485250
* :class:`collections.defaultdict`
52495251
* :class:`collections.OrderedDict`

Doc/library/sys.monitoring.rst

+2
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ events, use the expression ``PY_RETURN | PY_START``.
173173

174174
Events are divided into three groups:
175175

176+
.. _monitoring-event-local:
177+
176178
Local events
177179
''''''''''''
178180

Doc/library/test.rst

+30-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,27 @@ The :mod:`test.support` module defines the following constants:
246246

247247
.. data:: is_android
248248

249-
``True`` if the system is Android.
249+
``True`` if ``sys.platform`` is ``android``.
250+
251+
252+
.. data:: is_emscripten
253+
254+
``True`` if ``sys.platform`` is ``emscripten``.
255+
256+
257+
.. data:: is_wasi
258+
259+
``True`` if ``sys.platform`` is ``wasi``.
260+
261+
262+
.. data:: is_apple_mobile
263+
264+
``True`` if ``sys.platform`` is ``ios``, ``tvos``, or ``watchos``.
265+
266+
267+
.. data:: is_apple
268+
269+
``True`` if ``sys.platform`` is ``darwin`` or ``is_apple_mobile`` is ``True``.
250270

251271

252272
.. data:: unix_shell
@@ -831,6 +851,15 @@ The :mod:`test.support` module defines the following functions:
831851
Decorator for tests that fill the address space.
832852

833853

854+
.. function:: linked_with_musl()
855+
856+
Return ``False`` if there is no evidence the interperter was compiled with
857+
``musl``, otherwise return a version triple, either ``(0, 0, 0)`` if the
858+
version is unknown, or the actual version if it is known. Intended for use
859+
in ``skip`` decorators. ``emscripten`` and ``wasi`` are assumed to be
860+
compiled with ``musl``; otherwise ``platform.libc_ver`` is checked.
861+
862+
834863
.. function:: check_syntax_error(testcase, statement, errtext='', *, lineno=None, offset=None)
835864

836865
Test for syntax errors in *statement* by attempting to compile *statement*.

0 commit comments

Comments
 (0)