Victor Stinner
426449d983
gh-132825: Enhance unhashable error messages for dict and set ( #132828 )
2025-04-23 17:10:09 +02:00
Victor Stinner
10cbd1fe88
gh-130947: Add again PySequence_Fast() to the limited C API ( #130948 )
...
Add again PySequence_Fast() to the limited C API.
Add unit tests.
2025-03-13 13:00:57 +01:00
Serhiy Storchaka
a30277a06a
gh-71339: Use new assertion methods in test_capi (GH-129053)
2025-01-20 14:32:27 +02:00
Sergey B Kirpichev
2f20f5a9bc
gh-111495: Add tests for PyNumber C API ( #111996 )
2024-08-26 15:59:22 +02:00
Erlend E. Aasland
e006c7371d
gh-105201: Add PyIter_NextItem() ( #122331 )
...
Return -1 and set an exception on error; return 0 if the iterator is
exhausted, and return 1 if the next item was fetched successfully.
Prefer this API to PyIter_Next(), which requires the caller to use
PyErr_Occurred() to differentiate between iterator exhaustion and errors.
Co-authered-by: Irit Katriel <iritkatriel@yahoo.com>
2024-08-08 00:47:15 +02:00
Serhiy Storchaka
e2e0b4b4b9
gh-113024: C API: Add PyObject_GenericHash() function (GH-113025)
2024-03-22 20:19:10 +02:00
Victor Stinner
039d20ae54
gh-116417: Move limited C API abstract.c tests to _testlimitedcapi ( #116986 )
...
Split abstract.c and float.c tests of _testcapi into two parts:
limited C API tests in _testlimitedcapi and non-limited C API tests
in _testcapi.
Update test_bytes and test_class.
2024-03-19 10:44:13 +00:00
Serhiy Storchaka
e0449b9a7f
Add more C API tests (GH-112522)
...
Add tests for PyObject_Str(), PyObject_Repr(), PyObject_ASCII() and
PyObject_Bytes().
2023-11-29 17:37:05 +02:00
Serhiy Storchaka
f55cb44359
gh-106672: C API: Report indiscriminately ignored errors (GH-106674)
...
Functions which indiscriminately ignore all errors now report them as
unraisable errors.
2023-11-07 15:58:04 +02:00
Serhiy Storchaka
a8e1f474c2
gh-111495: Test C API functions with extreme sizes and indices (GH-111631)
2023-11-04 11:40:46 +02:00
Evan Kohilas
842e5fcdcd
gh-94808: Add coverage test for number check (gh-111445)
2023-10-29 07:00:19 +00:00
Alex Waygood
19601efa36
gh-109653: Remove unused imports in the `Lib/` directory ( #109803 )
2023-09-24 15:07:23 +01:00
Serhiy Storchaka
add16f1a5e
gh-108511: Add C API functions which do not silently ignore errors (GH-109025)
...
Add the following functions:
* PyObject_HasAttrWithError()
* PyObject_HasAttrStringWithError()
* PyMapping_HasKeyWithError()
* PyMapping_HasKeyStringWithError()
2023-09-17 14:23:31 +03:00
Serhiy Storchaka
3a08db8d13
gh-106307: Fix PyMapping_GetOptionalItemString() (GH-108797)
...
The resulting pointer was not set to NULL if the creation of a temporary
string object was failed.
The tests were also missed due to oversight.
2023-09-06 19:47:38 +00:00
Serhiy Storchaka
16c9415fba
gh-107178: Add the C API tests for the Abstract Objects Layer (GH-107179)
...
Cover all the Mapping Protocol, almost all the Sequence Protocol
(except PySequence_Fast) and a part of the Object Protocol.
Move existing tests to Lib/test/test_capi/test_abstract.py and
Modules/_testcapi/abstract.c.
Add also tests for PyDict C API.
2023-08-07 18:51:43 +03:00