summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* bpo-46771: Implement task cancel requests counter (GH-31513)Tin Tvrtković2022-02-241-10/+9
| | | | | This changes cancelling() and uncancel() to return the count of pending cancellations. This can be used to avoid bugs in certain edge cases (e.g. two timeouts going off at the same time).
* bpo-46541: Remove usage of _Py_IDENTIFIER from array module (GH-31376)Dong-hee Na2022-02-171-25/+70
|
* bpo-46752: Add TaskGroup; add Task..cancelled(),.uncancel() (GH-31270)Guido van Rossum2022-02-151-1/+48
| | | | | | | | | | | | | | | | | asyncio/taskgroups.py is an adaptation of taskgroup.py from EdgeDb, with the following key changes: - Allow creating new tasks as long as the last task hasn't finished - Raise [Base]ExceptionGroup (directly) rather than TaskGroupError deriving from MultiError - Instead of monkey-patching the parent task's cancel() method, add a new public API to Task The Task class has a new internal flag, `_cancel_requested`, which is set when `.cancel()` is called successfully. The `.cancelling()` method returns the value of this flag. Further `.cancel()` calls while this flag is set return False. To reset this flag, call `.uncancel()`. Thus, a Task that catches and ignores `CancelledError` should call `.uncancel()` if it wants to be cancellable again; until it does so, it is deemed to be busy with uninterruptible cleanup. This new Task API helps solve the problem where TaskGroup needs to distinguish between whether the parent task being cancelled "from the outside" vs. "from inside". Co-authored-by: Yury Selivanov <yury@edgedb.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46728: fix docstring of combinations_with_replacement for consistency ↵DongGeon Lee2022-02-151-2/+2
| | | | (GH-31293)
* bpo-45948: Remove constructor discrepancy in C version of ↵Jacob Walls2022-02-121-2/+2
| | | | | ElementTree.XMLParser (GH-31152) Both implementations accept target=None now.
* bpo-46613: Add PyType_GetModuleByDef to the public API (GH-31081)Petr Viktorin2022-02-111-3/+3
| | | | | * Make PyType_GetModuleByDef public (remove underscore) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-40280: Address more test failures on Emscripten (GH-31050)Christian Heimes2022-02-051-1/+9
| | | Co-authored-by: Brett Cannon <brett@python.org>
* bpo-46433: _PyType_GetModuleByDef: handle static types in MRO (GH-30696)Petr Viktorin2022-02-021-1/+31
| | | Automerge-Triggered-By: GH:encukou
* bpo-41857: mention timeout argument units in select.poll() and ↵Zane Bitter2022-01-201-1/+9
| | | | select.depoll() doc-strings (GH-22406)
* bpo-46315: Add ifdef HAVE_ feature checks for WASI compatibility (GH-30507)Christian Heimes2022-01-131-1/+9
|
* bpo-45582: Port getpath[p].c to Python (GH-29041)Steve Dower2021-12-031-1/+33
| | | | | The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code. This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.
* bpo-41498: Fix build on platforms without sigset_t (GH-29770)Christian Heimes2021-11-251-13/+13
|
* bpo-45467: Fix IncrementalDecoder and StreamReader in the ↵Serhiy Storchaka2021-10-141-5/+13
| | | | | | | | | "raw-unicode-escape" codec (GH-28944) They support now splitting escape sequences between input chunks. Add the third parameter "final" in codecs.raw_unicode_escape_decode(). It is True by default to match the former behavior.
* bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" ↵Serhiy Storchaka2021-10-141-5/+13
| | | | | | | | | codec (GH-28939) They support now splitting escape sequences between input chunks. Add the third parameter "final" in codecs.unicode_escape_decode(). It is True by default to match the former behavior.
* bpo-41710: Add private _PyDeadline_Get() function (GH-28674)Victor Stinner2021-10-011-5/+5
| | | | | | | | Add a private C API for deadlines: add _PyDeadline_Init() and _PyDeadline_Get() functions. * Add _PyTime_Add() and _PyTime_Mul() functions which compute t1+t2 and t1*t2 and clamp the result on overflow. * _PyTime_MulDiv() now uses _PyTime_Add() and _PyTime_Mul().
* [codemod] Fix non-matching bracket pairs (GH-28473)Mohamad Mansour2021-09-211-2/+2
| | | | | Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-43413: Fix handling keyword arguments in subclasses of some buitin ↵Serhiy Storchaka2021-09-125-22/+39
| | | | | | | | 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-40563: Support pathlike objects on dbm/shelve (GH-21849)Henry-Joseph Audéoud2021-09-102-16/+2
| | | | Co-authored-by: Hakan Çelik <hakancelik96@outlook.com>
* bpo-38371: Remove deprecated `tkinter` split() method (GH-28237)Erlend Egeberg Aasland2021-09-081-9/+1
|
* bpo-43613: Faster implementation of gzip.compress and gzip.decompress (GH-27941)Ruben Vorderman2021-09-021-10/+22
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-45085: Remove the binhex module (GH-28117)Victor Stinner2021-09-021-140/+1
| | | | | | | | | | The binhex module, deprecated in Python 3.9, is now removed. The following binascii functions, deprecated in Python 3.9, are now also removed: * a2b_hqx(), b2a_hqx(); * rlecode_hqx(), rledecode_hqx(). The binascii.crc_hqx() function remains available.
* bpo-45060: Get rid of few uses of the equality operators with None (GH-28087)Serhiy Storchaka2021-08-311-2/+2
|
* bpo-41818: Add termios.tcgetwinsize(), termios.tcsetwinsize(). (GH-23686)Soumendra Ganguly2021-08-271-1/+65
| | | | | | | | | | | | * Add termios.tcgetwinsize(), termios.tcsetwinsize(). Update docs. * Add TIOCGSIZE support to termios.tcgetwinsize() * Add TIOCSSIZE support to termios.tcsetwinsize() Authored-by: Soumendra Ganguly <soumendraganguly@gmail.com> * termios.tcgetwinsize() and termios.tcsetwinsize() should return/accept two-item tuples instead of lists. * Refactor tcsetwinsize to share common code and accept any two item sequence, with overflow checking. Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]