summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi/test_getargs.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-121039: add Floats/ComplexesAreIdenticalMixin to test.support.testcase ↵Sergey B Kirpichev2024-09-081-15/+12
| | | | (GH-121071)
* gh-119213: Be More Careful About _PyArg_Parser.kwtuple Across Interpreters ↵Eric Snow2024-05-221-0/+33
| | | | | | | | | (gh-119331) _PyArg_Parser holds static global data generated for modules by Argument Clinic. The _PyArg_Parser.kwtuple field is a tuple object, even though it's stored within a static global. In some cases the tuple is statically allocated and thus it's okay that it gets shared by multiple interpreters. However, in other cases the tuple is set lazily, allocated from the heap using the active interprepreter at the point the tuple is needed. This is a problem once that interpreter is destroyed since _PyArg_Parser.kwtuple becomes at dangling pointer, leading to crashes. It isn't a problem if the tuple is allocated under the main interpreter, since its lifetime is bound to the lifetime of the runtime. The solution here is to temporarily switch to the main interpreter. The alternative would be to always statically allocate the tuple. This change also fixes a bug where only the most recent parser was added to the global linked list.
* gh-68114: Fix handling for removed PyArg_ParseTuple 'w' formatters (GH-8204)Joe Jevnik2024-04-231-17/+21
| | | | Co-authored-by: Joe Jevnik <joe@quantopian.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-107944: Improve error message for getargs with bad keyword arguments ↵Shantanu2024-02-081-13/+13
| | | | (#114792)
* gh-112438: Fix support of format units with the "e" prefix in nested tuples ↵Serhiy Storchaka2023-11-271-0/+28
| | | | in PyArg_Parse (gh-112439)
* gh-110572: Remove `test_*` from `_testcapi/getargs.c` (GH-111214)Nikita Sobolev2023-10-241-6/+9
|
* gh-67565: Add tests for C-contiguity checks (GH-110951)Furkan Onder2023-10-191-0/+19
|
* gh-110815: Support non-ASCII keyword names in PyArg_ParseTupleAndKeywords() ↵Serhiy Storchaka2023-10-141-0/+51
| | | | | | | (GH-110816) It already mostly worked, except in the case when invalid keyword argument with non-ASCII name was passed to function with non-ASCII parameter names. Then it crashed in the debug mode.
* gh-110815: Improve tests for PyArg_ParseTupleAndKeywords() (GH-110817)Serhiy Storchaka2023-10-131-5/+31
|
* gh-109050: Remove remaining tests for legacy Unicode C API (GH-109068)Serhiy Storchaka2023-09-091-64/+0
|
* gh-80527: Change support.requires_legacy_unicode_capi() (#108438)Victor Stinner2023-08-241-4/+4
| | | | | | | | | | | | | The decorator now requires to be called with parenthesis: @support.requires_legacy_unicode_capi() instead of: @support.requires_legacy_unicode_capi The implementation now only imports _testcapi when the decorator is called, so "import test.support" no longer imports the _testcapi extension.
* gh-104922: Make `PY_SSIZE_T_CLEAN` not mandatory again (#105051)Inada Naoki2023-05-311-17/+0
|
* gh-99240: Reset pointer to NULL when the pointed memory is freed in argument ↵colorfulappl2022-12-171-0/+4
| | | | | | parsing (#99890) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* bpo-34272: Reorganize C API tests. (GH-8551)Serhiy Storchaka2022-11-101-0/+1297
Move some C API tests into Lib/test/test_capi/.