summaryrefslogtreecommitdiff
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* gh-104372: Cleanup _posixsubprocess `make_inheritable` for async signal ↵Gregory P. Smith2023-05-171-34/+91
| | | | | | | | | | safety and no GIL requirement (#104518) Move all of the Python C API calls into the parent process up front instead of doing PyLong_AsLong and PyErr_Occurred and PyTuple_GET from the post-fork/vfork child process. Much of this was long overdue. We shouldn't have been using PyTuple and PyLong APIs within all of these low level functions anyways.
* GH-101520: Move tracemalloc functionality into core, leaving interface in ↵Mark Shannon2023-05-171-1541/+12
| | | | Modules. (#104508)
* gh-104469: Update README.txt for _testcapi (gh-104529)Dong-hee Na2023-05-171-0/+7
| | | | | | * gh-104469: Update README.txt for _testcapi Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* GH-103092: isolate `_elementtree` (#104561)Kumar Aditya2023-05-171-43/+42
|
* GH-103092: isolate `pyexpat` (#104506)Kumar Aditya2023-05-161-8/+21
|
* GH-104510: Fix refleaks in `_io` base types (#104516)Kumar Aditya2023-05-163-26/+6
|
* gh-103763: Implement PEP 695 (#103764)Jelle Zijlstra2023-05-153-1/+29
| | | | | | | | | | | | | | This implements PEP 695, Type Parameter Syntax. It adds support for: - Generic functions (def func[T](): ...) - Generic classes (class X[T](): ...) - Type aliases (type X = ...) - New scoping when the new syntax is used within a class body - Compiler and interpreter changes to support the new syntax and scoping rules Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Eric Traut <eric@traut.com> Co-authored-by: Larry Hastings <larry@hastings.org> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-104469: Convert _testcapi/watchers.c to use Argument Clinic (#104503)Nikita Sobolev2023-05-152-43/+259
| | | | | | | | | | Remove boilerplate code by converting the following functions: - _testcapi.watch_dict - _testcapi.unwatch_dict - _testcapi.watch_type - _testcapi.unwatch_type - _testcapi.set_func_defaults_via_capi - _testcapi.set_func_kwdefaults_via_capi
* gh-104341: Adjust tstate_must_exit() to Respect Interpreter Finalization ↵Eric Snow2023-05-154-4/+5
| | | | | (gh-104437) With the move to a per-interpreter GIL, this check slipped through the cracks.
* gh-101819: Fix _io clinic input for unused base class method stubs (#104418)Erlend E. Aasland2023-05-156-109/+168
| | | | | | When preparing the _io extension module for isolation, many methods were adapted to Argument Clinic. Some of these used the '*args: object' signature, which is incorrect. These are now corrected to an exact signature, and marked unused, since they are stub methods.
* gh-101819: Isolate `_io` (#101948)Erlend E. Aasland2023-05-159-346/+198
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-104469 Convert _testcapi/float.c to use AC (gh-104470)Dong-hee Na2023-05-152-19/+123
|
* gh-104456: Fix ref leak in _ctypes.COMError (#104457)Kirill Podoprigora2023-05-141-1/+9
|
* gh-103857: Update deprecation stacktrace to point to calling line (#104431)Hugo van Kemenade2023-05-121-2/+2
|
* gh-93649: Split gc- and allocation tests from _testcapimodule.c (GH-104403)Jurica Bradarić2023-05-124-327/+349
|
* gh-101819: Prepare _io._IOBase for module state (#104386)Erlend E. Aasland2023-05-124-11/+21
| | | | - Add PyIOBase_Type to _io module state - Pass defining class to _io._IOBase.fileno
* gh-87526: Remove dead initialization from _zoneinfo parse_abbr() (#24700)Alex Henrie2023-05-121-1/+1
|
* gh-99108: Refresh HACL* from upstream (#104401)Jonathan Protzenko2023-05-112-2/+2
| | | Refresh HACL* from upstream and add a SHA3 test hashing over 4GiB of data.
* gh-101819: Fix inverted debug preprocessor check in winconsoleio.c (#104388)Erlend E. Aasland2023-05-111-1/+1
|
* gh-101819: Adapt _io.IOBase.seek and _io.IOBase.truncate to Argument Clinic ↵Erlend E. Aasland2023-05-112-22/+135
| | | | (#104384)
* gh-101819: Adapt _io._Buffered* methods to Argument Clinic (#104367)Erlend E. Aasland2023-05-112-56/+328
|
* gh-101819: Refactor `_io` futher in preparation for module isolation (#104369)Erlend E. Aasland2023-05-115-116/+268
|
* gh-101819: Adapt _io.TextIOBase methods to Argument Clinic (#104383)Erlend E. Aasland2023-05-112-40/+233
|
* gh-103538: Remove unused TK_AQUA code (GH-103539)Christopher Chavez2023-05-102-64/+0
|
* gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202)Sebastian Berg2023-05-102-90/+10
| | | | | | | | | | This PR removes `_Py_dg_stdnan` and `_Py_dg_infinity` in favour of using the standard `NAN` and `INFINITY` macros provided by C99. This change has the side-effect of fixing a bug on MIPS where the hard-coded value used by `_Py_dg_stdnan` gave a signalling NaN rather than a quiet NaN. --------- Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* gh-101819: Adapt _io._BufferedIOBase_Type methods to Argument Clinic (#104355)Erlend E. Aasland2023-05-102-44/+236
| | | | Make sure the defining class is passed to all methods, so we can easily fetch module state from them in the future.
* gh-101819: Clean up _io windows console io after gh-104197 (#104354)Erlend E. Aasland2023-05-103-3/+3
|
* gh-101819: Harden _io init (#104352)Erlend E. Aasland2023-05-101-3/+4
| | | Fix potential refleak if PyModule_AddObject() fails.
* gh-101819: Refactor _io in preparation for module isolation (#104334)Erlend E. Aasland2023-05-093-42/+80
| | | | | | | | | | - Replace query with parameter in bufferediobase_unsupported() - Replace query with parameter in iobase_unsupported() - Hide delegate: Add method wrapper for _PyIOBase_check_seekable - Hide delegate: Add method wraper for _PyIOBase_check_readable - Hide delegate: Add method wraper for _PyIOBase_check_writable - Replace query with parameter in _PyIOBase_check_seekable() - Replace query with parameter in _PyIOBase_check_readable() - Replace query with parameter in _PyIOBase_check_writable()
* gh-97933: (PEP 709) inline list/dict/set comprehensions (#101441)Carl Meyer2023-05-091-0/+2
| | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-104240: return code unit metadata from codegen (#104300)Irit Katriel2023-05-091-1/+1
|
* gh-104276: Make `_struct.unpack_iterator` type use type flag instead of ↵chgnrdv2023-05-091-7/+1
| | | | custom constructor (#104277)
* gh-104180: Read SOCKS proxies from macOS System Configuration (#104181)samschott2023-05-091-0/+5
| | | | | | | | read SOCKS proxies from macOS System Configuration in ``urllib.request``. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* GH-104308: socket.getnameinfo should release the GIL (#104307)Nathaniel J. Smith2023-05-081-0/+2
| | | | | | | | | * socket.getnameinfo should release the GIL * 📜🤖 Added by blurb_it. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-99108: fix typo in Modules/Setup (#104293)Jonathan Protzenko2023-05-081-1/+1
| | | case sensitive filename
* Trim trailing whitespace and test on CI (#104275)Hugo van Kemenade2023-05-087-9/+9
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-99108: Replace SHA3 implementation HACL* version (#103597)Jonathan Protzenko2023-05-0716-414/+1184
| | | | | | | | | | | Replaces our built-in SHA3 implementation with a verified one from the HACL* project. This implementation is used when OpenSSL does not provide SHA3 or is not present. 3.11 shiped with a very slow tiny sha3 implementation to get off of the <=3.10 reference implementation that wound up having serious bugs. This brings us back to a reasonably performing built-in implementation consistent with what we've just replaced our other guaranteed available standard hash algorithms with: code from the HACL* project. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-104265 Disallow instantiation of `_csv.Reader` and `_csv.Writer` (#104266)chgnrdv2023-05-071-2/+2
|
* gh-104240: make _PyCompile_CodeGen support different compilation modes (#104241)Irit Katriel2023-05-072-12/+25
|
* gh-101819: Port _io.PyBytesIOBuffer_Type to heap type (#104264)Erlend E. Aasland2023-05-073-50/+29
|
* gh-100370: fix OverflowError in sqlite3.Connection.blobopen for 32-bit ↵Erlend E. Aasland2023-05-072-9/+26
| | | | builds (#103902)
* gh-101819: Adapt _io.PyWindowsConsoleIO_Type to heap type (#104197)Erlend E. Aasland2023-05-073-69/+51
|
* gh-101819: Port _io.PyIncrementalNewlineDecoder_Type to heap type (#104249)Erlend E. Aasland2023-05-073-47/+42
|
* gh-97696: Use `PyObject_CallMethodNoArgs` and inline is_loop_running check ↵Itamar Ostricher2023-05-071-18/+5
| | | | in `_asyncio` (#104255)
* gh-99113: Add a check for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104206)Eric Snow2023-05-061-1/+59
| | | Py_MOD_PER_INTERPRETER_GIL_SUPPORTED is a new supported value for Py_mod_multiple_interpreters, added in gh-104205.
* gh-101819: Remove unused 'locale_module' from _io state (#104246)Erlend E. Aasland2023-05-062-5/+0
| | | | The locale module reference was introduced by 932ff8368 in 2013, and rendered unused by 710e82630 (gh-23050) in 2020.
* gh-101819: Prepare to modernize the _io extension (#104178)Victor Stinner2023-05-069-37/+92
| | | | | | | | | | | | | | | | | | | | | * Add references to static types to _PyIO_State: * PyBufferedIOBase_Type * PyBytesIOBuffer_Type * PyIncrementalNewlineDecoder_Type * PyRawIOBase_Type * PyTextIOBase_Type * Add the defining class to methods: * _io.BytesIO.getbuffer() * _io.FileIO.close() * Add get_io_state_by_cls() function. * Add state parameter to _textiowrapper_decode() * _io_TextIOWrapper___init__() now sets self->state before calling _textiowrapper_set_decoder(). Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-97696: Remove redundant #include (#104216)Jacob Bower2023-05-051-1/+0
| | | | | Remove "#include cpython/context.h"` from `_asynciomodule.c`. It's already included in `Python.h`.
* gh-99113: Add PyInterpreterConfig.own_gil (gh-104204)Eric Snow2023-05-052-2/+17
| | | | | We also add PyInterpreterState.ceval.own_gil to record if the interpreter actually has its own GIL. Note that for now we don't actually respect own_gil; all interpreters still share the one GIL. However, PyInterpreterState.ceval.own_gil does reflect PyInterpreterConfig.own_gil. That lie is a temporary one that we will fix when the GIL really becomes per-interpreter.
* gh-99113: Add Py_MOD_PER_INTERPRETER_GIL_SUPPORTED (gh-104205)Eric Snow2023-05-0586-3/+125
| | | Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).