summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
Commit message (Collapse)AuthorAgeFilesLines
* bpo-15999: Accept arbitrary values for boolean parameters. (#15609)Serhiy Storchaka2022-12-038-96/+96
| | | builtins and extension module functions and methods that expect boolean values for parameters now accept any Python object rather than just a bool or int type. This is more consistent with how native Python code itself behaves.
* gh-99845: Use size_t type in __sizeof__() methods (#99846)Victor Stinner2022-11-302-14/+14
| | | | | | | | The implementation of __sizeof__() methods using _PyObject_SIZE() now use an unsigned type (size_t) to compute the size, rather than a signed type (Py_ssize_t). Cast explicitly signed (Py_ssize_t) values to unsigned type (Py_ssize_t).
* GH-91375: Port `_asyncio` static types to heap types and module state (#99122)Kumar Aditya2022-11-291-30/+145
| | | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684)Zackery Spytz2022-11-251-1/+27
| | | | | In multiprocessing.shared_memory.SharedMemory(), the temporary view returned by MapViewOfFile() should be unmapped when it is no longer needed.
* gh-64490: Fix bugs in argument clinic varargs processing (#32092)colorfulappl2022-11-241-1/+389
|
* gh-99240: Fix double-free bug in Argument Clinic str_converter generated ↵colorfulappl2022-11-241-1/+71
| | | | | | | | code (GH-99241) Fix double-free bug mentioned at https://github.com/python/cpython/issues/99240, by moving memory clean up out of "exit" label. Automerge-Triggered-By: GH:erlend-aasland
* gh-64490: Fix refcount error when arguments are packed to tuple in argument ↵colorfulappl2022-11-241-1/+66
| | | | clinic (#99233)
* gh-99547: Add isjunction methods for checking if a path is a junction (GH-99548)Charles Machalow2022-11-221-1/+33
|
* gh-96002: Add functional test for Argument Clinic (#96178)colorfulappl2022-11-211-0/+2291
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-87092: expose the compiler's codegen to python for unit tests (GH-99111)Irit Katriel2022-11-141-1/+64
|
* gh-98930: improve the docstring of signal.strsignal (#99290)ram vikram singh2022-11-131-3/+4
| | | | | | | Improves the docstring on signal.strsignal to make it explain when it returns a message, None, or when it raises ValueError. Closes #98930 Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-98793: Fix typecheck in `overlapped.c` (#98835)Charlie Zhao2022-10-301-1/+9
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-95023: Added os.setns and os.unshare functions (#95046)Noam Cohen2022-10-201-1/+150
| | | | | | | | Added os.setns and os.unshare to easily switch between namespaces on Linux. Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Victor Stinner <vstinner@python.org>
* GH-98363: Add itertools.batched() (GH-98364)Raymond Hettinger2022-10-171-1/+80
|
* gh-95534: Improve gzip reading speed by 10% (#97664)Ruben Vorderman2022-10-171-1/+99
| | | | | | | | | Change summary: + There is now a `gzip.READ_BUFFER_SIZE` constant that is 128KB. Other programs that read in 128KB chunks: pigz and cat. So this seems best practice among good programs. Also it is faster than 8 kb chunks. + a zlib._ZlibDecompressor was added. This is the _bz2.BZ2Decompressor ported to zlib. Since the zlib.Decompress object is better for in-memory decompression, the _ZlibDecompressor is hidden. It only makes sense in file decompression, and that is already implemented now in the gzip library. No need to bother the users with this. + The ZlibDecompressor uses the older Cpython arrange_output_buffer functions, as those are faster and more appropriate for the use case. + GzipFile.read has been optimized. There is no longer a `unconsumed_tail` member to write back to padded file. This is instead handled by the ZlibDecompressor itself, which has an internal buffer. `_add_read_data` has been inlined, as it was just two calls. EDIT: While I am adding improvements anyway, I figured I could add another one-liner optimization now to the python -m gzip application. That read chunks in io.DEFAULT_BUFFER_SIZE previously, but has been updated now to use READ_BUFFER_SIZE chunks.
* gh-95011: Migrate syslog module to Argument Clinic (GH-95012)Noam Cohen2022-10-081-0/+257
|
* gh-96288: Add a sentence to `os.mkdir`'s docstring. (#96271)Hagai Helman Tov2022-10-071-2/+3
|
* gh-97955: Migrate `zoneinfo` to Argument Clinic (#97958)Nikita Sobolev2022-10-071-0/+188
|
* gh-64373: Convert `_functools` to Argument Clinic (#96640)Nikita Sobolev2022-10-071-0/+104
|
* GH-96704: Add {Task,Handle}.get_context(), use it in ↵Guido van Rossum2022-10-051-1/+18
| | | | | call_exception_handler() (#96756) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE ↵Serhiy Storchaka2022-10-033-14/+14
| | | | | | | converter (GH-97729) It affects function os.system() on Windows and Windows-specific modules winreg, _winapi, _overlapped, and _msi.
* GH-78724: Initialize struct.Struct in __new__ (GH-94532)Kumar Aditya2022-09-251-8/+8
| | | | Closes https://github.com/python/cpython/issues/75960 Closes https://github.com/python/cpython/issues/78724
* gh-93678: add _testinternalcapi.optimize_cfg() and test utils for compiler ↵Irit Katriel2022-08-241-0/+68
| | | | optimization unit tests (GH-96007)
* gh-90928: Improve static initialization of keywords tuple in AC (#95907)Erlend E. Aasland2022-08-1337-4137/+1609
|
* gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code ↵Eric Snow2022-08-1161-291/+8247
| | | | | | | | | | | | | | | | (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-91323: Revert "Allow overriding a future compliance check in asyncio.Task ↵Łukasz Langa2022-08-041-38/+1
| | | | | | (GH-32197)" (GH-95442) This reverts commit d4bb38f82bf18b00db3129031ce4969b6f0caab9.
* gh-95417: Quick fix for "ULONG_PTR differs in levels of indirection from ↵Oleg Iarygin2022-08-011-3/+3
| | | | void *" (GH-95538)
* gh-94512: Fix forced arg format in AC-processed resource (GH-94515)Oleg Iarygin2022-07-291-24/+25
|
* gh-94512: Fix forced arg format in AC-processed overlapped (GH-94516)Oleg Iarygin2022-07-281-53/+318
|
* GH-93899: fix checks for eventfd flags (GH-95170)Kumar Aditya2022-07-271-7/+7
|
* gh-95174: Handle missing dup() and constants in WASI (GH-95229)Christian Heimes2022-07-261-1/+9
| | | | | | | - check for ``dup()`` libc function - handle missing ``F_DUPFD`` in ``dup2()`` replacement function - add workaround for WASI libc bug in MSG_TRUNC - ESHUTDOWN is missing, use EPIPE instead - POLLPRI is missing, define as 0 (no-op)
* gh-94199: Remove ssl.RAND_pseudo_bytes() function (#94202)Victor Stinner2022-06-241-32/+1
| | | | Remove the ssl.RAND_pseudo_bytes() function, deprecated in Python 3.6: use os.urandom() or ssl.RAND_bytes() instead.
* bpo-42658: Use LCMapStringEx in ntpath.normcase to match OS behaviour for ↵AN Long2022-06-061-1/+38
| | | | case-folding (GH-32010)
* gh-92536: PEP 623: Remove wstr and legacy APIs from Unicode (GH-92537)Inada Naoki2022-05-123-49/+3
|
* bpo-41818: Add os.login_tty() for *nix. (#29658)Soumendra Ganguly2022-05-051-1/+40
| | | | | | * Add `os.login_tty(fd)` for Unix. Reviewed-by: Christian Heimes <christian@python.org> Signed-off-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* gh-92210: Move socket.__init__ to argument clinic (#92237)Joshua Herman2022-05-041-0/+65
| | | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)Victor Stinner2022-05-0356-608/+608
| | | | Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func).
* gh-91583: AC: Fix regression for functions with defining_class (GH-91739)Serhiy Storchaka2022-04-3014-348/+404
| | | | | Argument Clinic now generates the same efficient code as before adding the defining_class parameter.
* bpo-40676: Use Argument Clinic for csv (where possible) (GH-20200)Shantanu2022-04-161-0/+134
|
* bpo-47000: Add `locale.getencoding()` (GH-32068)Inada Naoki2022-04-091-8/+8
|
* Change parameter name from *x* for reals to *n* for integers. (GH-32377)Raymond Hettinger2022-04-061-3/+3
|
* bpo-47152: Move sources of the _sre module into a subdirectory (GH-32290)Serhiy Storchaka2022-04-041-926/+0
|
* bpo-23689: re module, fix memory leak when a match is terminated by a signal ↵Ma Lin2022-04-031-7/+20
| | | | or memory allocation failure (GH-32283)
* bpo-47167: Allow overriding a future compliance check in asyncio.Task (GH-32197)Andrew Svetlov2022-04-011-1/+38
|
* bpo-38256: Fix binascii.crc32() when inputs are 4+GiB (GH-32000)Gregory P. Smith2022-03-201-3/+8
| | | | | | | When compiled with `USE_ZLIB_CRC32` defined (`configure` sets this on POSIX systems), `binascii.crc32(...)` failed to compute the correct value when the input data was >= 4GiB. Because the zlib crc32 API is limited to a 32-bit length. This lines it up with the `zlib.crc32(...)` implementation that doesn't have that flaw. **Performance:** This also adopts the same GIL releasing for larger inputs logic that `zlib.crc32` has, and causes the Windows build to always use zlib's crc32 instead of our slow C code as zlib is a required build dependency on Windows.
* bpo-47039: Normalize repr() of asyncio future and task objects (GH-31950)Andrew Svetlov2022-03-171-35/+1
|
* bpo-46994: Accept explicit contextvars.Context in asyncio create_task() API ↵Andrew Svetlov2022-03-141-7/+14
| | | | (GH-31837)
* bpo-47003: Cleanup _overlapped module (GH-31848)Andrew Svetlov2022-03-131-21/+46
|
* bpo-46805: Add low level UDP socket functions to asyncio (GH-31455)Alex Grönholm2022-03-131-1/+39
|
* bpo-46937: convert remaining functions to AC in _weakref (GH-31705)Kumar Aditya2022-03-071-1/+47
|