Skip to content

Commit 5b39df3

Browse files
committed
Merge branch 'main' into docs/productionlist-grammar
2 parents 8144750 + c1a02f9 commit 5b39df3

Some content is hidden

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

58 files changed

+1183
-914
lines changed

Doc/c-api/typeobj.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 1 addition & 0 deletions
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/test.rst

Lines changed: 30 additions & 1 deletion
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)