summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)Victor Stinner2022-05-0374-724/+724
| | | | Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func).
* gh-89289: Harden sqlite3.Connection init (#92214)Erlend Egeberg Aasland2022-05-031-8/+15
| | | | | - Make sure SQLite resources are freed if database open fails - Remove unneeded branches if init is aborted
* gh-92206: Improve scoping of sqlite3 reset statement helper (#92241)Erlend Egeberg Aasland2022-05-033-30/+28
|
* bpo-46696: Add socket.SO_INCOMING_CPU constant (#31237)David CARLIER2022-05-031-0/+3
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-89452: Prefer gdbm-compat over ndbm (#92208)Łukasz Langa2022-05-031-4/+4
| | | | | This makes macOS gdbm provided by Homebrew not segfault through correct selection of the linked library (-lgdbm_compat) *AND* the correct ndbm-style header (gdbm-ndbm.h instead of the invalid ndbm.h).
* gh-90887: posix module: Add more flags for fcopy_file (#31300)David CARLIER2022-05-031-0/+3
| | | | | | Closes #90887 Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-92154: Expose PyCode_GetCode in the C API (GH-92168)Ken Jin2022-05-031-0/+24
|
* gh-92206: Improve scoping of sqlite3 register cursor helper (#92212)Erlend Egeberg Aasland2022-05-033-28/+23
|
* gh-92206: Move pysqlite_step() to Modules/_sqlite/cursor.c (#92207)Erlend Egeberg Aasland2022-05-033-16/+14
|
* bpo-46785: Fix race condition between os.stat() and unlink on Windows (GH-31858)Itai Steinherz2022-05-021-1/+11
|
* gh-89301: Fix regression with bound values in traced SQLite statements (#92053)Erlend Egeberg Aasland2022-05-021-14/+40
|
* gh-91952: Make TextIOWrapper.reconfigure() supports "locale" encoding (GH-91982)Inada Naoki2022-05-011-2/+10
|
* gh-92019: Make sqlite3.Blob indexing conform with the norm (#92020)Erlend Egeberg Aasland2022-04-301-18/+44
| | | | | | - get index now returns an int - set index now requires an int in range(0, 256) Resolves #92019
* gh-91583: AC: Fix regression for functions with defining_class (GH-91739)Serhiy Storchaka2022-04-3017-432/+782
| | | | | Argument Clinic now generates the same efficient code as before adding the defining_class parameter.
* gh-91324: List feature macros in the stable ABI manifest, improve tests ↵Petr Viktorin2022-04-282-0/+62
| | | | (GH-32415)
* gh-91498: socket: Add TCP_CONNECTION_INFO on macOS (#69256)David CARLIER2022-04-271-0/+3
| | | Fixes GH-91498
* gh-91870: Remove unsupported SRE opcode CALL (GH-91872)Serhiy Storchaka2022-04-263-40/+37
| | | | | | | It was initially added to support atomic groups, but that support was never fully implemented, and CALL was only left in the compiler, but not interpreter and parser. ATOMIC_GROUP is now used to support atomic groups.
* gh-91401: Add a failsafe way to disable vfork. (#91490)Gregory P. Smith2022-04-251-3/+4
| | | | | | | | | | | | | | Just in case there is ever an issue with _posixsubprocess's use of vfork() due to the complexity of using it properly and potential directions that Linux platforms where it defaults to on could take, this adds a failsafe so that users can disable its use entirely by setting a global flag. No known reason to disable it exists. But it'd be a shame to encounter one and not be able to use CPython without patching and rebuilding it. See the linked issue for some discussion on reasoning. Also documents the existing way to disable posix_spawn.
* gh-64783: Fix signal.NSIG value on FreeBSD (#91929)Victor Stinner2022-04-253-35/+27
| | | | | | | | | Fix signal.NSIG value on FreeBSD to accept signal numbers greater than 32, like signal.SIGRTMIN and signal.SIGRTMAX. * Add Py_NSIG constant. * Add pycore_signal.h internal header file. * _Py_Sigset_Converter() now includes the range of valid signals in the error message.
* gh-89653: PEP 670: Functions don't cast pointers (#91697)Victor Stinner2022-04-251-4/+6
| | | | | | | | | | | | | | | | | | | | | In the limited C API version 3.11 and newer, the following functions no longer cast their object pointer argument with _PyObject_CAST() or _PyObject_CAST_CONST(): * Py_REFCNT(), Py_TYPE(), Py_SIZE() * Py_SET_REFCNT(), Py_SET_TYPE(), Py_SET_SIZE() * Py_IS_TYPE() * Py_INCREF(), Py_DECREF() * Py_XINCREF(), Py_XDECREF() * Py_NewRef(), Py_XNewRef() * PyObject_TypeCheck() * PyType_Check() * PyType_CheckExact() Split Py_DECREF() implementation in 3 versions to make the code more readable. Update the xxlimited.c extension, which uses the limited C API version 3.11, to pass PyObject* to these functions.
* gh-91217: deprecate spwd (#91846)Brett Cannon2022-04-231-0/+7
| | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-91291: Accept attributes as keyword arguments in decimal.localcontext ↵Sam Ezeh2022-04-222-57/+95
| | | | | (#32242) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-69093: Add indexing and slicing support to sqlite3.Blob (#91599)Erlend Egeberg Aasland2022-04-221-5/+202
| | | | Authored-by: Aviv Palivoda <palaviv@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
* gh-90623: signal.raise_signal() calls PyErr_CheckSignals() (#91756)Victor Stinner2022-04-212-1/+17
| | | | signal.raise_signal() and os.kill() now call PyErr_CheckSignals() to check immediately for pending signals.
* gh-91731: Replace Py_BUILD_ASSERT() with static_assert() (#91730)Victor Stinner2022-04-205-10/+17
| | | | | | | | | | | | Python 3.11 now uses C11 standard which adds static_assert() to <assert.h>. * In pytime.c, replace Py_BUILD_ASSERT() with preprocessor checks on SIZEOF_TIME_T with #error. * On macOS, py_mach_timebase_info() now accepts timebase members with the same size than _PyTime_t. * py_get_monotonic_clock() now saturates GetTickCount64() to _PyTime_MAX: GetTickCount64() is unsigned, whereas _PyTime_t is signed.
* gh-91734: Fix ossaudio support on Solaris (GH-91735)Jakub Kulík2022-04-201-0/+4
|
* bpo-46712: share more global strings in deepfreeze (gh-32152)Kumar Aditya2022-04-192-1/+2
| | | (for gh-90868)
* gh-91616: re module, fix .fullmatch() mismatch when using Atomic Grouping or ↵Ma Lin2022-04-191-7/+7
| | | | | | | | | Possessive Quantifiers (GH-91681) These jumps should use DO_JUMP0() instead of DO_JUMP(): - JUMP_POSS_REPEAT_1 - JUMP_POSS_REPEAT_2 - JUMP_ATOMIC_GROUP
* gh-90699: Use module state to access insert str object. (GH-91693)Dong-hee Na2022-04-191-3/+49
|
* gh-91526: io: Remove device encoding support from TextIOWrapper (GH-91529)Inada Naoki2022-04-191-50/+6
| | | | `TextIOWrapper.__init__()` called `os.device_encoding(file.fileno())` if fileno is 0-2 and encoding=None. But it is very rarely works, and never documented behavior.
* bpo-47256: Increasing the depth of backtracking in RE (GH-32411)Ma Lin2022-04-182-44/+44
| | | | | | | | | | Limit the maximum capturing group to 2**30-1 on 64-bit platforms (it was 2**31-1). No change on 32-bit platforms (2**28-1). It allows to reduce the size of SRE(match_context): - On 32 bit platform: 36 bytes, no change. (msvc2022) - On 64 bit platform: 72 bytes -> 56 bytes. (msvc2022/gcc9.4) which leads to increasing the depth of backtracking.
* bpo-46053: Fix OSS audio support on NetBSD (GH-30065)Thomas Klausner2022-04-181-0/+78
|
* gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769)Oleg Iarygin2022-04-185-47/+47
| | | | Co-authored-by: Éric <merwok@netwok.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-91217: deprecate ossaudiodev (GH-91641)Brett Cannon2022-04-171-0/+7
| | | Automerge-Triggered-By: GH:brettcannon
* gh-91217: deprecate nis (GH-91606)Brett Cannon2022-04-161-0/+6
| | | Automerge-Triggered-By: GH:brettcannon
* bpo-40676: Use Argument Clinic for csv (where possible) (GH-20200)Shantanu2022-04-162-37/+197
|
* gh-69093: Add context manager support to sqlite3.Blob (GH-91562)Erlend Egeberg Aasland2022-04-162-1/+95
|
* gh-90501: Add PyErr_GetHandledException and PyErr_SetHandledException (GH-30531)Irit Katriel2022-04-151-0/+11
|
* gh-69093: improve sqlite3.Connection.blobopen() error handling (GH-91571)Erlend Egeberg Aasland2022-04-151-1/+5
| | | | | Unless sqlite3_blob_open() returns SQLITE_MISUSE, the error code and message are available on the connection object. This means we have to handle SQLITE_MISUSE error messages explicitly.
* gh-91404: Use computed gotos and reduce indirection in re (#91495)Brandt Bucher2022-04-152-343/+452
|
* gh-69093: Don't allow instantiation of sqlite3.Blob objects (GH-91570)Erlend Egeberg Aasland2022-04-151-1/+1
|
* gh-69093: Expose sqlite3.Blob as a class (GH-91550)Jelle Zijlstra2022-04-151-0/+1
| | | | I noticed this was missing while writing typeshed stubs. It's useful to expose it for use in annotations and for exploration.
* Remove usage of _Py_IDENTIFIER from unicodedata module. (GH-91532)Dong-hee Na2022-04-151-14/+8
|
* gh-69093: Support basic incremental I/O to blobs in `sqlite3` (GH-30680)Erlend Egeberg Aasland2022-04-158-6/+739
| | | | | | | Authored-by: Aviv Palivoda <palaviv@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no> Co-authored-by: palaviv <palaviv@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-91353: Fix void return type handling in ctypes (GH-32246)Hood Chatham2022-04-142-2/+7
|
* gh-91156: Fix `encoding="locale"` in UTF-8 mode (GH-70056)Inada Naoki2022-04-144-15/+23
|
* gh-90699: Remove usage of _Py_IDENTIFIER from bisect module. (GH-91522)Dong-hee Na2022-04-141-5/+2
|
* bpo-47152: Automatically regenerate sre_constants.h (GH-91439)Serhiy Storchaka2022-04-121-2/+2
| | | | | | | * Move the code for generating Modules/_sre/sre_constants.h from Lib/re/_constants.py into a separate script Tools/scripts/generate_sre_constants.py. * Add target `regen-sre` in the makefile. * Make target `regen-all` depending on `regen-sre`.
* gh-79097: Add support for aggregate window functions in sqlite3 (GH-20903)Erlend Egeberg Aasland2022-04-124-8/+230
|
* bpo-45995: add "z" format specifer to coerce negative 0 to zero (GH-30049)John Belmonte2022-04-111-7/+119
| | | | | | | | Add "z" format specifier to coerce negative 0 to zero. See https://github.com/python/cpython/issues/90153 (originally https://bugs.python.org/issue45995) for discussion. This covers `str.format()` and f-strings. Old-style string interpolation is not supported. Co-authored-by: Mark Dickinson <dickinsm@gmail.com>