Commit graph

11 commits

Author SHA1 Message Date
Miss Islington (bot)
748bc48648
[3.12] gh-108082: C API: Add tests for PyErr_WriteUnraisable() (GH-111455) (GH-111507)
Also document the behavior when called with NULL.
(cherry picked from commit bca3305429)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-30 17:36:00 +00:00
Serhiy Storchaka
e65401d245
[3.12] C API tests: use special markers to test that output parameters were set (GH-109014) (#109023)
[3.12] C API tests: use special markers to test that output parameters were set (GH-109014).
(cherry picked from commit bf414b7fcb)
2023-09-08 15:09:49 +02:00
Miss Islington (bot)
ba7e06bb63
[3.12] Add Modules/_testcapi/util.h header (GH-108774) (#108780)
Add Modules/_testcapi/util.h header (GH-108774)

It contains common macros used in C API tests.
(cherry picked from commit 0e01fac315)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-09-02 23:43:14 +02:00
Miss Islington (bot)
97d67e9dab
[3.12] gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918) (#108134)
* gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918)

Such C API functions as PyErr_SetString(), PyErr_Format(),
PyErr_SetFromErrnoWithFilename() and many others no longer crash or
ignore errors if it failed to format the error message or decode the
filename. Instead, they keep a corresponding error.
(cherry picked from commit 633ea217a8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

* Define PY_SSIZE_T_CLEAN.

---------

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-20 23:07:24 +02:00
Irit Katriel
b45df737d4
[3.12] gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* implementation in the unstable API (GH-105072) (#105095)
(cherry picked from commit b7aadb4583)
2023-05-30 16:50:23 +01:00
Dong-hee Na
2e91c7e626
gh-104469: Convert _testcapi/exceptions to use AC (gh-104502) 2023-05-21 18:39:45 +09:00
Irit Katriel
5c471f3f2a
gh-102755: PyErr_DisplayException only in ABI >= 3.12. Tests cover PyErr_Display as well (GH-102849) 2023-03-21 10:36:18 +01:00
Irit Katriel
3f9285a8c5
gh-102755: Add PyErr_DisplayException(exc) (#102756) 2023-03-16 22:18:04 +00:00
Irit Katriel
51d693c584
gh-102594: PyErr_SetObject adds note to exception raised on normalization error (#102675) 2023-03-16 10:16:01 +00:00
Irit Katriel
a33ca2ad1f
gh-102493: fix normalization in PyErr_SetObject (#102502)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-03-07 13:27:46 -08:00
Erlend E. Aasland
efc985a714
gh-93649: Split exception tests from _testcapimodule.c (GH-102173)
Automerge-Triggered-By: GH:erlend-aasland
2023-02-23 07:03:13 -08:00