summaryrefslogtreecommitdiffstats
path: root/PC/clinic
Commit message (Collapse)AuthorAgeFilesLines
* gh-117557: Improve error messages when a string, bytes or bytearray of ↵Serhiy Storchaka2024-05-281-7/+41
| | | | length 1 are expected (GH-117631)
* gh-85283: Build _testconsole extension with limited C API (#117125)Victor Stinner2024-03-211-80/+19
|
* gh-85283: Build winsound extension with limited C API (#110978)Victor Stinner2023-10-171-122/+16
| | | Replace type->tp_name with PyType_GetQualName().
* gh-110964: Remove private _PyArg functions (#110966)Victor Stinner2023-10-175-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-110147: test_msvcrt: run console I/O tests in new processes (#110268)AN Long2023-10-051-69/+1
|
* gh-108996: fix and enable test_msvcrt (#109226)AN Long2023-09-221-1/+69
| | | | | | * Add _testconsole.flush_console_input_buffer() function. * test_kbhit(), test_getwch() and test_getwche() now call flush_console_input_buffer(). * Don't override sys.stdin anymore (not needed).
* gh-109266: Fix msvcrt.kbhit's documented return value (GH-109267)AN Long2023-09-121-2/+2
|
* gh-107603: Argument Clinic: Only include pycore_gc.h if needed (#108726)Victor Stinner2023-08-315-24/+14
| | | | | | | | | | | | | | | | | | | | 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-108635: Make parameters of some implementations of special methods ↵Serhiy Storchaka2023-08-291-32/+5
| | | | positional-only (GH-108636)
* 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-243-27/+27
| | | | Argument Clinic now uses the new public PyLong_AsInt(), rather than the old name _PyLong_AsInt().
* gh-92536: Argument Clinic no longer emits PyUnicode_READY() (#105208)Victor Stinner2023-06-013-15/+3
| | | | | | Since Python 3.12, PyUnicode_READY() does nothing and always returns 0. Argument Clinic now also checks for .cpp files (PC/_wmimodule.cpp).
* gh-105156: Argument Clinic avoids Py_UNICODE type (#105161)Victor Stinner2023-05-311-41/+37
| | | | Argument Clinic now uses "const wchar_t*" type instead of "const Py_UNICODE*" type for the "Py_UNICODE" format.
* gh-104773: Remove the msilib package (GH-104911)Zachary Ware2023-05-251-698/+0
|
* gh-103092: Isolate winreg (#103250)AN Long2023-04-171-27/+27
|
* gh-102255: Improve build support for Windows API partitions (GH-102256)Max Bachmann2023-03-092-2/+258
| | | | | Add `MS_WINDOWS_DESKTOP`, `MS_WINDOWS_APPS`, `MS_WINDOWS_SYSTEM` and `MS_WINDOWS_GAMES` preprocessor definitions to allow switching off functionality missing from particular API partitions ("partitions" are used in Windows to identify overlapping subsets of APIs). CPython only officially supports `MS_WINDOWS_DESKTOP` and `MS_WINDOWS_SYSTEM` (APPS is included by normal desktop builds, but APPS without DESKTOP is not covered). Other configurations are a convenience for people building their own runtimes. `MS_WINDOWS_GAMES` is for the Xbox subset of the Windows API, which is also available on client OS, but is restricted compared to `MS_WINDOWS_DESKTOP`. These restrictions may change over time, as they relate to the build headers rather than the OS support, and so we assume that Xbox builds will use the latest available version of the GDK.
* gh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE ↵Serhiy Storchaka2022-10-032-22/+22
| | | | | | | converter (GH-97729) It affects function os.system() on Windows and Windows-specific modules winreg, _winapi, _overlapped, and _msi.
* gh-89545: Updates platform module to use new internal _wmi module on Windows ↵Steve Dower2022-09-071-0/+75
| | | | to directly query OS properties (GH-96289)
* gh-90928: Improve static initialization of keywords tuple in AC (#95907)Erlend E. Aasland2022-08-133-173/+73
|
* gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code ↵Eric Snow2022-08-115-15/+375
| | | | | | | | | | | | | | | | (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-95423: Update winreg.DeleteKeyEx documentation and remove dynamic ↵Derek Kim2022-08-031-2/+5
| | | | function load (GH-95521)
* gh-94512: Fix forced arg format in AC-processed winreg (GH-94513)Oleg Iarygin2022-07-041-17/+198
|
* gh-94512: Fix forced arg format in AC-processed msvcrtmodule (GH-94514)Oleg Iarygin2022-07-041-5/+19
|
* gh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537)Inada Naoki2022-05-122-98/+2
|
* gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)Victor Stinner2022-05-035-39/+39
| | | | Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func).
* bpo-36346: Make using the legacy Unicode C API optional (GH-21437)Serhiy Storchaka2020-07-101-8/+6
| | | | Add compile time option USE_UNICODE_WCHAR_CACHE. Setting it to 0 makes the interpreter not using the wchar_t cache and the legacy Unicode C API.
* bpo-36346: Undeprecate private function _PyUnicode_AsUnicode(). (GH-21336)Serhiy Storchaka2020-07-052-44/+2
|
* bpo-41187: Convert the _msi module to Argument Clinic (GH-21264)Serhiy Storchaka2020-07-011-0/+728
|
* bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (GH-21223)Serhiy Storchaka2020-06-301-30/+297
|
* bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779)Victor Stinner2020-06-101-1/+19
| | | | | | | | | | | | test_repl.test_close_stdin() now calls support.suppress_msvcrt_asserts() to fix the test on Windows. * Move suppress_msvcrt_asserts() from test.libregrtest.setup to test.support. Make its verbose parameter optional: verbose=False by default. * Add msvcrt.GetErrorMode(). * SuppressCrashReport now uses GetErrorMode() and SetErrorMode() of the msvcrt module, rather than using ctypes. * Remove also an unused variable (deadline) in wait_process().
* bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)Serhiy Storchaka2020-05-263-83/+3
| | | | Only __index__ should be used to make integer conversions lossless.
* bpo-37034: Display argument name on errors with keyword arguments with ↵Rémi Lapeyre2019-08-292-9/+9
| | | | Argument Clinic. (GH-13593)
* bpo-37730: Fix usage of NotImplemented instead of NotImplementedError in ↵David H2019-07-311-4/+4
| | | | docs. (GH-15062)
* bpo-36127: Argument Clinic: inline parsing code for keyword parameters. ↵Serhiy Storchaka2019-03-143-21/+79
| | | | (GH-12058)
* bpo-35582: Argument Clinic: inline parsing code for positional parameters. ↵Serhiy Storchaka2019-01-112-18/+100
| | | | (GH-11313)
* bpo-23867: Argument Clinic: inline parsing code for a single positional ↵Serhiy Storchaka2018-12-252-14/+64
| | | | parameter. (GH-9689)
* bpo-35489: Use "const Py_UNICODE *" for the Py_UNICODE converter in AC. ↵Serhiy Storchaka2018-12-141-39/+43
| | | | (GH-11150)
* bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. ↵Serhiy Storchaka2018-11-274-31/+31
| | | | | | | | (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-32240: Add the const qualifier to declarations of PyObject* array ↵Serhiy Storchaka2017-12-154-31/+31
| | | | arguments. (#4746)
* bpo-9566: Change HANDLE argument parsing to unsigned in msvcrtmodule.c (#2904)Segev Finer2017-07-271-3/+3
|
* bpo-9566: Fix some Windows x64 compiler warnings (#2492)Segev Finer2017-07-261-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-9566: Silence liblzma warnings * bpo-9566: Silence tcl warnings * bpo-9566: Silence tk warnings * bpo-9566: Silence tix warnings * bpo-9566: Fix some library warnings * bpo-9566: Fix msvcrtmodule.c warnings * bpo-9566: Silence _bz2 warnings * bpo-9566: Fixed some _ssl warnings * bpo-9566: Fix _msi warnings * bpo-9566: Silence _ctypes warnings * Revert "bpo-9566: Fixed some _ssl warnings" This reverts commit a639001c949ba53338a9ee047d2ec1efd2505e6f. * bpo-9566: Also consider NULL as a possible error in HANDLE_return_converter * bpo-9566: whitespace fixes
* bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)Serhiy Storchaka2017-07-034-99/+31
| | | | | the bare METH_FASTCALL be used for functions with positional-only parameters.
* bpo-30600: Fix error messages (condition order in Argument Clinic) (#2051)Sylvain2017-06-102-53/+53
| | | | | | | | The function '_PyArg_ParseStack()' and '_PyArg_UnpackStack' were failing (with error "XXX() takes Y argument (Z given)") before the function '_PyArg_NoStackKeywords()' was called. Thus, the latter did not raise its more meaningful error : "XXX() takes no keyword arguments".
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-3/+3
|
* Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner2017-01-174-55/+123
| | | | | Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using only positional arguments.
* Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywordsVictor Stinner2017-01-173-10/+10
| | | | Issue #29286.
* Issue #28217: Adds _testconsole module to test console input. Fixes some ↵Steve Dower2016-10-031-0/+82
| | | | issues found by the tests.
* Issue #27810: Rerun Argument Clinic on all modulesVictor Stinner2016-09-102-26/+26
|
* clinic: PY_LONG_LONG -> long longBenjamin Peterson2016-09-081-5/+5
|
* Closes #27982: Allow keyword arguments to winsound functionsZachary Ware2016-09-061-17/+23
|