summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/selectmodule.c.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-116646, AC: Always use PyObject_AsFileDescriptor() in fildes (#116806)Victor Stinner2024-03-141-11/+19
| | | | | | | The fildes converter of Argument Clinic now always call PyObject_AsFileDescriptor(), not only for the limited C API. The _PyLong_FileDescriptor_Converter() converter stays as a fallback when PyObject_AsFileDescriptor() cannot be used.
* gh-110964: Remove private _PyArg functions (#110966)Victor Stinner2023-10-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the following private functions and structures to pycore_modsupport.h internal C API: * _PyArg_BadArgument() * _PyArg_CheckPositional() * _PyArg_NoKeywords() * _PyArg_NoPositional() * _PyArg_ParseStack() * _PyArg_ParseStackAndKeywords() * _PyArg_Parser structure * _PyArg_UnpackKeywords() * _PyArg_UnpackKeywordsWithVararg() * _PyArg_UnpackStack() * _Py_ANY_VARARGS() Changes: * Python/getargs.h now includes pycore_modsupport.h to export functions. * clinic.py now adds pycore_modsupport.h when one of these functions is used. * Add pycore_modsupport.h includes when a C extension uses one of these functions. * Define Py_BUILD_CORE_MODULE in C extensions which now include directly or indirectly (via code generated by Argument Clinic) pycore_modsupport.h: * _csv * _curses_panel * _dbm * _gdbm * _multiprocessing.posixshmem * _sqlite.row * _statistics * grp * resource * syslog * _testcapi: bad_get() no longer uses METH_FASTCALL calling convention but METH_VARARGS. Replace _PyArg_UnpackStack() with PyArg_ParseTuple(). * _testcapi: add PYTESTCAPI_NEED_INTERNAL_API macro which is defined by _testcapi sub-modules which need the internal C API (pycore_modsupport.h): exceptions.c, float.c, vectorcall.c, watchers.c. * Remove Include/cpython/modsupport.h header file. Include/modsupport.h no longer includes the removed header file. * Fix mypy clinic.py
* gh-107603: Argument Clinic: Only include pycore_gc.h if needed (#108726)Victor Stinner2023-08-311-6/+5
| | | | | | | | | | | | | | | | | | | | Argument Clinic now only includes pycore_gc.h if PyGC_Head is needed, and only includes pycore_runtime.h if _Py_ID() is needed. * Add 'condition' optional argument to Clinic.add_include(). * deprecate_keyword_use() includes pycore_runtime.h when using the _PyID() function. * Fix rendering of includes: comments start at the column 35. * Mark PC/clinic/_wmimodule.cpp.h and "Objects/stringlib/clinic/*.h.h" header files as generated in .gitattributes. Effects: * 42 header files generated by AC no longer include the internal C API, instead of 4 header files before. For example, Modules/clinic/_abc.c.h no longer includes the internal C API. * Fix _testclinic_depr.c.h: it now always includes pycore_runtime.h to get _Py_ID().
* gh-106320: Remove private _PyLong_FileDescriptor_Converter() (#108503)Victor Stinner2023-08-261-1/+2
| | | | | | | | | Move the private _PyLong converter functions to the internal C API * _PyLong_FileDescriptor_Converter(): moved to pycore_fileutils.h * _PyLong_Size_t_Converter(): moved to pycore_long.h Argument Clinic now emits includes for pycore_fileutils.h and pycore_long.h when these functions are used.
* gh-106320: Remove private _PyLong converter functions (#108499)Victor Stinner2023-08-261-1/+2
| | | | | | | | | | | Move these private functions to the internal C API (pycore_long.h): * _PyLong_UnsignedInt_Converter() * _PyLong_UnsignedLongLong_Converter() * _PyLong_UnsignedLong_Converter() * _PyLong_UnsignedShort_Converter() Argument Clinic now emits #include "pycore_long.h" when these functions are used.
* gh-108444: Argument Clinic uses PyLong_AsInt() (#108458)Victor Stinner2023-08-241-7/+7
| | | | Argument Clinic now uses the new public PyLong_AsInt(), rather than the old name _PyLong_AsInt().
* gh-101409: Improve generated clinic code for self type checks (#101411)Erlend E. Aasland2023-01-311-5/+4
|
* gh-90928: Improve static initialization of keywords tuple in AC (#95907)Erlend E. Aasland2022-08-131-86/+36
|
* gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code ↵Eric Snow2022-08-111-6/+177
| | | | | | | | | | | | | | | | (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-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)Victor Stinner2022-05-031-14/+14
| | | | Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func).
* bpo-41857: mention timeout argument units in select.poll() and ↵Zane Bitter2022-01-201-1/+9
| | | | select.depoll() doc-strings (GH-22406)
* bpo-43413: Fix handling keyword arguments in subclasses of some buitin ↵Serhiy Storchaka2021-09-121-3/+5
| | | | | | | | classes (GH-26456) * Constructors of subclasses of some buitin classes (e.g. tuple, list, frozenset) no longer accept arbitrary keyword arguments. * Subclass of set can now define a __new__() method with additional keyword parameters without overriding also __init__().
* bpo-1635741: Port select module to multiphase init (GH-23409)Christian Heimes2020-11-211-3/+3
|
* bpo-41985: Add _PyLong_FileDescriptor_Converter and AC converter for ↵Serhiy Storchaka2020-10-091-10/+10
| | | | "fildes". (GH-22620)
* bpo-31938: Fix default-value signatures of several functions in the select ↵Anthony Sottile2020-06-231-5/+9
| | | | module (GH-21066)
* bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)Serhiy Storchaka2020-05-261-41/+1
| | | | Only __index__ should be used to make integer conversions lossless.
* bpo-38580: Document that select() accepts iterables, not just sequences ↵Jakub Stasiak2020-05-251-2/+2
| | | | (GH-16832)
* bpo-38116: Convert select module to PEP-384 (#15971)Dino Viehland2019-09-141-3/+3
| | | | | | | | | | * Convert select module to PEP-384 Summary: Do the necessary versions to be Pyro-compatible, including migrating `PyType_Ready` to `PyType_FromSpec` and moving static data into a new `_selectstate` struct. * 📜🤖 Added by blurb_it. * Fixup Mac OS/X build
* bpo-36127: Argument Clinic: inline parsing code for keyword parameters. ↵Serhiy Storchaka2019-03-141-16/+103
| | | | (GH-12058)
* bpo-35582: Argument Clinic: Optimize the "all boring objects" case. (GH-11520)Serhiy Storchaka2019-01-111-13/+36
| | | | | Use _PyArg_CheckPositional() and inlined code instead of PyArg_UnpackTuple() and _PyArg_UnpackStack() if all parameters are positional and use the "object" converter.
* bpo-35582: Argument Clinic: inline parsing code for positional parameters. ↵Serhiy Storchaka2019-01-111-11/+57
| | | | (GH-11313)
* bpo-23867: Argument Clinic: inline parsing code for a single positional ↵Serhiy Storchaka2018-12-251-5/+17
| | | | parameter. (GH-9689)
* bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. ↵Serhiy Storchaka2018-11-271-14/+14
| | | | | | | | (GH-6748) Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS in Argument Clinic generated code.
* bpo-20260: Implement non-bitwise unsigned int converters for Argument ↵Serhiy Storchaka2018-07-261-5/+5
| | | | Clinic. (GH-8434)
* bpo-31938: Convert selectmodule.c to Argument Clinic (GH-4265)Tal Einat2018-06-301-0/+1050