summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* gh-102304: doc: Add links to Stable ABI and Limited C API (#105345)Victor Stinner2023-06-061-1/+1
| | | | | | | | | * Add "limited-c-api" and "stable-api" references. * Rename "stable-abi-list" reference to "limited-api-list". * Makefile: Document files regenerated by "make regen-limited-abi" * Remove first empty line in generated files: - Lib/test/test_stable_abi_ctypes.py - PC/python3dll.c
* gh-104399: Use newer libtommath APIs when necessary (GH-104407)Christopher Chavez2023-06-061-2/+21
|
* gh-80480: array: Add 'w' typecode. (#105242)Inada Naoki2023-06-041-26/+107
|
* gh-104690 Disallow thread creation and fork at interpreter finalization ↵chgnrdv2023-06-043-2/+30
| | | | | | | | | | | | | | | | | (#104826) Disallow thread creation and fork at interpreter finalization. in the following functions, check if interpreter is finalizing and raise `RuntimeError` with appropriate message: * `_thread.start_new_thread` and thus `threading` * `posix.fork` * `posix.fork1` * `posix.forkpty` * `_posixsubprocess.fork_exec` when a `preexec_fn=` is supplied. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-101524: Only Use Public C-API in the _xxsubinterpreters Module (gh-105258)Eric Snow2023-06-022-14/+4
| | | The _xxsubinterpreters module was meant to only use public API. Some internal C-API usage snuck in over the last few years (e.g. gh-28969). This fixes that.
* gh-104614: Fix potential ref. leak in ↵Erlend E. Aasland2023-06-021-1/+3
| | | | _testcapimodule/get_basic_static_type() (#105225)
* gh-105240: add missing function prototypes (#105241)Irit Katriel2023-06-021-2/+2
|
* GH-104584: Plugin optimizer API (GH-105100)Mark Shannon2023-06-021-0/+18
|
* gh-92536: Remove PyUnicode_READY() calls (#105210)Victor Stinner2023-06-0117-105/+2
| | | | Since Python 3.12, PyUnicode_READY() does nothing and always returns 0.
* gh-92536: Argument Clinic no longer emits PyUnicode_READY() (#105208)Victor Stinner2023-06-0116-178/+16
| | | | | | Since Python 3.12, PyUnicode_READY() does nothing and always returns 0. Argument Clinic now also checks for .cpp files (PC/_wmimodule.cpp).
* gh-104614: Make Sure ob_type is Always Set Correctly by PyType_Ready() ↵Eric Snow2023-06-011-0/+45
| | | | | | | (gh-105122) When I added the relevant condition to type_ready_set_bases() in gh-103912, I had missed that the function also sets tp_base and ob_type (if necessary). That led to problems for third-party static types. We fix that here, by making those extra operations distinct and by adjusting the condition to be more specific.
* gh-103142: Upgrade binary builds and CI to OpenSSL 1.1.1u (#105174)Gregory P. Smith2023-06-014-3/+8775
| | | | | | | | | | | | | Upgrade builds to OpenSSL 1.1.1u. This OpenSSL version addresses a pile if less-urgent CVEs since 1.1.1t. The Mac/BuildScript/build-installer.py was already updated. Also updates _ssl_data_111.h from OpenSSL 1.1.1u, _ssl_data_300.h from 3.0.9, and adds a new _ssl_data_31.h file from 3.1.1 along with the ssl.c code to use it. Manual edits to the _ssl_data_300.h file prevent it from removing any existing definitions in case those exist in some peoples builds and were important (avoiding regressions during backporting). backports of this prior to 3.12 will not include the openssl 3.1 header.
* gh-105145: Deprecate Py_GetPath() function (#105179)Victor Stinner2023-06-011-5/+3
| | | | | | | | | | | | | | Deprecate old Python initialization functions: * PySys_ResetWarnOptions() * Py_GetExecPrefix() * Py_GetPath() * Py_GetPrefix() * Py_GetProgramFullPath() * Py_GetProgramName() * Py_GetPythonHome() _tkinter.c uses sys.executable instead of Py_GetProgramName() and uses sys.prefix instead of Py_GetPrefix().
* gh-89886: Rely on HAVE_SYS_TIME_H (#105058)Erlend E. Aasland2023-06-012-0/+6
| | | | | | | Quoting autoconf (v2.71): All current systems provide time.h; it need not be checked for. Not all systems provide sys/time.h, but those that do, all allow you to include it and time.h simultaneously.
* remove unused #includes of pycore_pymem.h (#105166)Irit Katriel2023-06-011-1/+0
|
* gh-105107: Remove PyCFunction_Call() function (#105181)Victor Stinner2023-06-011-0/+14
| | | | | * Keep the function in the stable ABI. * Add unit tests on PyCFunction_Call() since it remains supported in the stable ABI.
* gh-105145: Remove old functions to config Python init (#105154)Victor Stinner2023-06-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the following old functions to configure the Python initialization, deprecated in Python 3.11: * PySys_AddWarnOptionUnicode() * PySys_AddWarnOption() * PySys_AddXOption() * PySys_HasWarnOptions() * PySys_SetArgvEx() * PySys_SetArgv() * PySys_SetPath() * Py_SetPath() * Py_SetProgramName() * Py_SetPythonHome() * Py_SetStandardStreamEncoding() * _Py_SetProgramFullPath() Most of these functions are kept in the stable ABI, except: * Py_SetStandardStreamEncoding() * _Py_SetProgramFullPath() Update Doc/extending/embedding.rst and Doc/extending/extending.rst to use the new PyConfig API. _testembed.c: * check_stdio_details() now sets stdio_encoding and stdio_errors of PyConfig. * Add definitions of functions removed from the API but kept in the stable ABI. * test_init_from_config() and test_init_read_set() now use PyConfig_SetString() instead of PyConfig_SetBytesString(). Remove _Py_ClearStandardStreamEncoding() internal function.
* gh-105156: Deprecate the old Py_UNICODE type in C API (#105157)Victor Stinner2023-06-013-7/+7
| | | | | | | | Deprecate the old Py_UNICODE and PY_UNICODE_TYPE types in the C API: use wchar_t instead. Replace Py_UNICODE with wchar_t in multiple C files. Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* gh-102251: Explicitly free state for test modules with state in test_import ↵sunmy20192023-05-311-1/+21
| | | | | (#105085) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-105156: Argument Clinic avoids Py_UNICODE type (#105161)Victor Stinner2023-05-316-29/+27
| | | | Argument Clinic now uses "const wchar_t*" type instead of "const Py_UNICODE*" type for the "Py_UNICODE" format.
* gh-62948: IOBase finalizer logs close() errors (#105104)Victor Stinner2023-05-311-12/+0
|
* gh-104922: Make `PY_SSIZE_T_CLEAN` not mandatory again (#105051)Inada Naoki2023-05-312-87/+0
|
* gh-105020: Share tp_bases and tp_mro Between Interpreters For All Static ↵Eric Snow2023-05-311-0/+23
| | | | | Builtin Types (gh-105115) In gh-103912 we added tp_bases and tp_mro to each PyInterpreterState.types.builtins entry. However, doing so ignored the fact that both PyTypeObject fields are public API, and not documented as internal (as opposed to tp_subclasses). We address that here by reverting back to shared objects, making them immortal in the process.
* gh-105071: add PyUnstable_Exc_PrepReraiseStar to expose except* ↵Irit Katriel2023-05-302-1/+49
| | | | implementation in the unstable API (#105072)
* gh-88745: Add _winapi.CopyFile2 and update shutil.copy2 to use it (GH-105055)Steve Dower2023-05-302-1/+164
|
* gh-102251: Fix reference leak in _testsinglephase initialization (#105082)sunmy20192023-05-301-1/+3
| | | | | Correctly decref 'initialized' in init_module() Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-104803: Implement ntpath.isdevdrive for checking whether a path is on a ↵Steve Dower2023-05-292-1/+159
| | | | Windows Dev Drive (GH-104805)
* GH-101588: Deprecate pickle/copy/deepcopy support in itertools (GH-104965)Raymond Hettinger2023-05-261-1/+43
|
* GH-104787: use managed dict in `_asyncio` (#104795)Kumar Aditya2023-05-261-9/+5
|
* gh-104372: Drop the GIL around the vfork() call. (#104782)Gregory P. Smith2023-05-251-1/+18
| | | | | | | | | On Linux where the `subprocess` module can use the `vfork` syscall for faster spawning, prevent the parent process from blocking other threads by dropping the GIL while it waits for the vfork'ed child process `exec` outcome. This prevents spawning a binary from a slow filesystem from blocking the rest of the application. Fixes #104372.
* gh-104773: PEP 594: Remove the audioop module (#104937)Victor Stinner2023-05-254-3325/+0
|
* gh-104773: PEP 594: Remove the crypt module (#104908)Victor Stinner2023-05-254-156/+0
| | | | Remove the crypt module and its private _crypt extension, deprecated in Python 3.11.
* gh-104820: Fixes os.stat on Windows to better handle file systems that do ↵Steve Dower2023-05-241-4/+8
| | | | not support FileIdInformation (GH-104892)
* gh-104773: PEP 594: Remove the nis module (#104897)Victor Stinner2023-05-243-540/+0
|
* gh-104773: PEP 594: Remove the spwd module (#104871)Victor Stinner2023-05-244-351/+0
| | | Remove spwd from the configure script and Modules/Setup.
* gh-99108: Refresh HACL* (#104808)Jonathan Protzenko2023-05-2414-140/+214
| | | Refresh HACL* from upstream to improve SHA2 performance and fix a 32-bit issue in SHA3.
* gh-104773: PEP 594: Remove the ossaudiodev module (#104862)Victor Stinner2023-05-243-1402/+1
| | | | | * Remove ossaudiodev extension in configure.ac and regenerate the configure script. * Remove ossaudiodev in Modules/Setup and Modules/Setup.stdlib.in.
* gh-104372: use == -1 before PyErr_Occurred (#104831)Gregory P. Smith2023-05-241-1/+1
| | | The ideal pattern for this. (already in the 3.11 backport)
* gh-103295: fix stack overwrite on 32-bit in perf map test harness (#104811)Carl Meyer2023-05-231-4/+9
|
* Fix missing/incomplete NULL checks in multiple source files (#104564)chgnrdv2023-05-235-1/+20
| | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-104469: Convert _testcapi/long to use AC (gh-104720)Dong-hee Na2023-05-232-35/+250
|
* gh-99108: Release the GIL around hashlib built-in computation (#104675)Gregory P. Smith2023-05-236-15/+204
| | | | | | | This matches the GIL releasing behavior of our existing `_hashopenssl` module, extending it to the HACL* built-ins. Includes adding comments to better describe the ENTER/LEAVE macros purpose and explain the lock strategy in both existing and new code.
* GH-103092: isolate `_ssl` (#104725)Kumar Aditya2023-05-223-14/+21
|
* gh-98836: Extend PyUnicode_FromFormat() (GH-98838)Serhiy Storchaka2023-05-214-29/+52
| | | | | | | | | * Support for conversion specifiers o (octal) and X (uppercase hexadecimal). * Support for length modifiers j (intmax_t) and t (ptrdiff_t). * Length modifiers are now applied to all integer conversions. * Support for wchar_t C strings (%ls and %lV). * Support for variable width and precision (*). * Support for flag - (left alignment).
* gh-103857: Document utcnow and utcfromtimestamp deprecations in What's New ↵Hugo van Kemenade2023-05-211-1/+1
| | | | | | (#104542) Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
* GH-101291: Add low level, unstable API for pylong (GH-101685)Mark Shannon2023-05-211-0/+13
| | | Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-103295: expose API for writing perf map files (#103546)gsallam2023-05-211-0/+27
| | | | | Co-authored-by: Aniket Panse <aniketpanse@fb.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Carl Meyer <carl@oddbird.net>
* gh-104469: Convert _testcapi/exceptions to use AC (gh-104502)Dong-hee Na2023-05-212-97/+531
|
* gh-104698: Fix reference leak in mmapmodule.c (#104700)Kirill Podoprigora2023-05-211-3/+19
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-104372: Use non-Raw malloc for c_fds_to_keep in _posixsubprocess (#104697)Gregory P. Smith2023-05-201-2/+2
| | | Use non-Raw malloc for c_fds_to_keep as the code could ask for 0 length.