summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
Commit message (Collapse)AuthorAgeFilesLines
* 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]
* bpo-44725 : expose specialization stats in python (GH-27192)Irit Katriel2021-07-291-1/+19
|
* bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and ↵Pablo Galindo Salgado2021-07-231-6/+6
| | | | _ssl._SSLSocket.write (GH-27271)
* bpo-44353: Implement typing.NewType __call__ method in C (#27262)Yurii Karabas2021-07-221-0/+12
| | | | Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Denis Laxalde <denis@laxalde.org>
* bpo-43086: Add handling for out-of-spec data in a2b_base64 (GH-24402)Idan Moral2021-07-191-8/+29
| | | | | | | binascii.a2b_base64 gains a strict_mode= parameter. When enabled it will raise an error on input that deviates from the base64 spec in any way. The default remains False for backward compatibility. Code reviews and minor tweaks by: Gregory P. Smith <greg@krypto.org> [Google]
* bpo-44582: Accelerate mimetypes.init on Windows with a native accelerator ↵Steve Dower2021-07-081-1/+37
| | | | (GH-27059)
* bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)Rupert Tombs2021-07-071-2/+2
|
* Update bisect docstrings (GH-26548)hrchu2021-06-061-5/+5
|
* Do not use Py_ssize_clean_t (GH-25940)Inada Naoki2021-05-083-12/+11
|
* bpo-18233: Add internal methods to access peer chain (GH-25467)Christian Heimes2021-04-261-1/+35
| | | | | | | | | | | | The internal `_ssl._SSLSocket` object now provides methods to retrieve the peer cert chain and verified cert chain as a list of Certificate objects. Certificate objects have methods to convert the cert to a dict, PEM, or DER (ASN.1). These are private APIs for now. There is a slim chance to stabilize the approach and provide a public API for 3.10. Otherwise I'll provide a stable API in 3.11. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-39529: Deprecate creating new event loop in asyncio.get_event_loop() ↵Serhiy Storchaka2021-04-251-1/+40
| | | | | | (GH-23554) asyncio.get_event_loop() emits now a deprecation warning when it creates a new event loop. In future releases it will became an alias of asyncio.get_running_loop().
* bpo-43538: Add extra arguments to os.startfile (GH-25538)Steve Dower2021-04-231-16/+71
|