summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapi
Commit message (Collapse)AuthorAgeFilesLines
* gh-98586: Add vector call APIs to the Limited API (GH-98587)Wenzel Jakob2022-10-271-4/+101
| | | Expose the facilities for making vector calls through Python's limited API.
* gh-94808: Cover `PyUnicode_Count` in CAPI (#96929)Nikita Sobolev2022-10-061-0/+21
|
* GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257)adphrost2022-09-151-0/+19
| | | | Co-authored-by: Andrew Frost <adfrost@fb.com> Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
* gh-95991: Add some infrastructure for testing Limited API in _testcapi ↵Petr Viktorin2022-08-172-16/+33
| | | | | | | | | | | | | (GH-95992) - Limited API needs to be enabled per source file - Some builds don't support Limited API, so Limited API tests must be skipped on those builds (currently this is `Py_TRACE_REFS`, but that may change.) - `Py_LIMITED_API` must be defined before `<Python.h>` is included. This puts the hoop-jumping in `testcapi/parts.h`, so individual test files can be relatively simple. (Currently that's only `vectorcall_limited.c`, imagine more.)
* GH-95245: Move weakreflist into the pre-header. (GH-95996)Mark Shannon2022-08-161-0/+32
|
* gh-95707: Fix function signature (GH-95995)Christian Heimes2022-08-151-1/+2
|
* GH-95707: Fix uses of `Py_TPFLAGS_MANAGED_DICT` (GH-95854)Mark Shannon2022-08-151-0/+45
| | | | | | * Make sure that tp_dictoffset is correct with Py_TPFLAGS_MANAGED_DICT is set. * Avoid traversing managed dict twice when subclassing class with Py_TPFLAGS_MANAGED_DICT set.
* gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code ↵Eric Snow2022-08-111-1/+7
| | | | | | | | | | | | | | | | (gh-95860) We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime. We'll solve that part of interpreter isolation separately. This change includes generated code. The non-generated changes are in: * Tools/clinic/clinic.py * Python/getargs.c * Include/cpython/modsupport.h * Makefile.pre.in (re-generate global strings after running clinic) * very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c All other changes are generated code (clinic, global strings).
* gh-95504: Fix negative numbers in PyUnicode_FromFormat (GH-95848)Petr Viktorin2022-08-101-0/+60
| | | Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
* gh-93649: Undefine NDEBUG in Modules/_testcapi/* to enable assert() (GH-95793)Petr Viktorin2022-08-101-0/+3
|
* gh-93649: Split unicode tests from _testcapimodule.c & add some more (GH-95819)Petr Viktorin2022-08-102-0/+654
| | | | | | - Move PyUnicode tests to a separate file - Add some more tests for PyUnicode_FromFormat Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
* Disable Limited API tests with Py_TRACE_REFS (GH-95796)Petr Viktorin2022-08-091-0/+15
|
* gh-93274: Expose receiving vectorcall in the Limited API (GH-95717)Petr Viktorin2022-08-082-0/+78
|
* Fix downcast compiler warning in Modules/_testcapi/vectorcall.c (#95729)Erlend E. Aasland2022-08-081-1/+1
|
* gh-93274: Make vectorcall safe on mutable classes & inherit it by default ↵Petr Viktorin2022-08-042-1/+228
| | | | (#95437)
* gh-95388: Deprecate creating immutable types with mutable bases (GH-95533)Petr Viktorin2022-08-041-0/+16
|
* GH-92678: Fix tp_dictoffset inheritance. (GH-95596)Mark Shannon2022-08-031-0/+28
| | | | | | * Add test for inheriting explicit __dict__ and weakref. * Restore 3.10 behavior for multiple inheritance of C extension classes that store their dictionary at the end of the struct.
* gh-93649: Split heaptype tests from _testcapimodule.c (GH-95386)Petr Viktorin2022-08-012-0/+974
| | | | | This removes the unused negative_dictoffset function: the type this function would create is available as _testcapi.HeapCTypeWithNegativeDict
* gh-93649: Fix linkage of _PyTestCapi_Init_Vectorcall (#94702)Oleg Iarygin2022-07-131-1/+1
|
* gh-93649: Split vectorcall testing from _testcapimodule.c (GH-94549)Petr Viktorin2022-07-083-0/+276
The `_testcapimodule.c` file is getting too large to work with effectively. This PR lays out a general structure of how tests can be split up, with more splitting to come later if the structure is OK. Vectorcall tests aren't the biggest issue -- it's just an area I want to work on next, so I'm starting here. An issue specific to vectorcall tests is that it wasn't clear that e.g. `MethodDescriptor2` is related to testing vectorcall: the `/* Test PEP 590 */` section had an ambiguous end. Separate file should make things like this much clearer. OTOH, for some pieces it might not be clear where they should be -- I left `meth_fastcall` with tests of the other calling conventions. IMO, even with the ambiguity it's still worth it to split the huge file up. I'm not sure about the buildsystem changes, hopefully CI will tell me what's wrong. @vstinner, @markshannon: Do you think this is a good idea? Automerge-Triggered-By: GH:encukou