summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* gh-122431: Disallow negative values in `readline.append_history_file` (#122469)Peter Bierma2024-12-051-0/+6
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593)Victor Stinner2024-12-051-0/+3
|
* gh-127481: Add `EPOLLWAKEUP` to the `select` module (GH-127482)RUANG (James Roy)2024-12-041-0/+4
|
* gh-123378: Ensure results of `PyUnicode*Error_Get{Start,End}` are clamped ↵Bénédikt Tran2024-12-041-0/+167
| | | | | | (GH-123380) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* gh-127572: Fix `test_structmembers` initialization (GH-127577)Sam Gross2024-12-041-1/+1
| | | | | | | | gh-127572: Fix `test_structmembers` initialization. The 'C' format code expects an `int` as a destination (not a `char`). This led to test failures on big-endian platforms like s390x. Use the 'c' format code, which expects a `char` as the destination (but requires a Python byte objects instead of a str).
* gh-117657: TSAN Fix races in `PyMember_Get` and `PyMember_Set` for C ↵Daniele Parmeggiani2024-12-031-3/+7
| | | | extensions (GH-123211)
* gh-126585: Add EHWPOISON error code (#126586)RUANG (James Roy)2024-12-031-0/+3
|
* gh-109523: Raise a BlockingIOError if reading text from a non-blocking ↵Giovanni Siragusa2024-12-021-0/+6
| | | | stream cannot immediately return bytes. (GH-122933)
* gh-126618: fix repr(itertools.count(sys.maxsize)) (#127048)Sergey B Kirpichev2024-12-021-6/+3
| | | Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-126890: Restore stripped `ssl` docstrings (GH-127281)Peter Bierma2024-12-022-14/+114
|
* GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Mark Shannon2024-12-021-0/+6
| | | | | | | | | | | | | collection (GH-127110) * Mark almost all reachable objects before doing collection phase * Add stats for objects marked * Visit new frames before each increment * Update docs * Clearer calculation of work to do.
* gh-127341: Argument Clinic: fix compiler warnings for getters with ↵Peter Bierma2024-11-294-163/+61
| | | | | docstrings (#127310) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-127190: Fix local_setattro() error handling (#127366)Victor Stinner2024-11-281-1/+1
| | | | Don't make the assumption that the 'name' argument is a string. Use repr() to format the 'name' argument instead.
* gh-127330: Update for OpenSSL 3.4 & document+improve the update process ↵Petr Viktorin2024-11-284-4/+682
| | | | | | | | | | | | | | | | | (GH-127331) - Add `git describe` output to headers generated by `make_ssl_data.py` This info is more important than the date when the file was generated. It does mean that the tool now requires a Git checkout of OpenSSL, not for example a release tarball. - Regenerate the older file to add the info. To the other older file, add a note about manual edits. - Add notes on how to add a new OpenSSL version - Add 3.4 error messages and multissl tests
* gh-124008: Fix calculation of the number of written bytes for the Windows ↵Serhiy Storchaka2024-11-271-28/+90
| | | | | | | | | | | | console (GH-124059) Since MultiByteToWideChar()/WideCharToMultiByte() is not reversible if the data contains invalid UTF-8 sequences, use binary search to calculate the number of written bytes from the number of written characters. Also fix writing incomplete UTF-8 sequences. Also fix handling of memory allocation failures.
* gh-127072: Remove outdated `socket.NETLINK_*` constants. (GH-127256)RUANG (James Roy)2024-11-271-18/+2
| | | | | Remove seriously outdated netlink constants. Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-69639: Add mixed-mode rules for complex arithmetic (C-like) (GH-124829)Sergey B Kirpichev2024-11-261-3/+47
| | | | | | | | | | | | | | | "Generally, mixed-mode arithmetic combining real and complex variables should be performed directly, not by first coercing the real to complex, lest the sign of zero be rendered uninformative; the same goes for combinations of pure imaginary quantities with complex variables." (c) Kahan, W: Branch cuts for complex elementary functions. This patch implements mixed-mode arithmetic rules, combining real and complex variables as specified by C standards since C99 (in particular, there is no special version for the true division with real lhs operand). Most C compilers implementing C99+ Annex G have only these special rules (without support for imaginary type, which is going to be deprecated in C2y).
* GH-126985: move pyvenv.cfg detection from site to getpath (#126987)Filipe Laíns 🇵🇸2024-11-261-15/+28
|
* gh-127182: Fix `io.StringIO.__setstate__` crash when `None` is the first ↵sobolevn2024-11-251-14/+16
| | | | | value (#127219) Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-109746: Make _thread.start_new_thread delete state of new thread on its ↵Radislav Chugunov2024-11-221-0/+1
| | | | | | | | | | startup failure (GH-109761) If Python fails to start newly created thread due to failure of underlying PyThread_start_new_thread() call, its state should be removed from interpreter' thread states list to avoid its double cleanup. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-127065: Make `methodcaller` thread-safe in free threading build (#127109)Sam Gross2024-11-221-0/+9
| | | | | | | The `methodcaller` C vectorcall implementation uses an arguments array that is shared across calls. The first argument is modified on every invocation. This isn't thread-safe in the free threading build. I think it's also not safe in general, but for now just disable it in the free threading build.
* gh-126316: Make grp.getgrall() thread-safe: add a mutex (#127055)Victor Stinner2024-11-212-22/+97
| | | | grpmodule.c is no longer built with the limited C API, since PyMutex is excluded from the limited C API.
* gh-126727: Fix locale.nl_langinfo(locale.ERA) (GH-126730)Serhiy Storchaka2024-11-211-24/+41
| | | | | It now returns multiple era description segments separated by semicolons. Previously it only returned the first segment on platforms with Glibc.
* gh-126991: Fix reference leak in loading pickle's opcode BUILD (GH-126990)Justin Applegate2024-11-191-0/+1
| | | If PyObject_SetItem() fails in the `load_build()` function of _pickle.c, no DECREF for the `dict` variable.
* gh-118201: Simplify conv_confname (#126089)Malcolm Smith2024-11-192-105/+52
|
* Revert "GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Hugo van Kemenade2024-11-191-7/+0
| | | | collection (GH-126502)" (#126983)
* gh-126876: Fix socket internal_select() for large timeout (#126968)Victor Stinner2024-11-191-1/+4
| | | | | | If the timeout is larger than INT_MAX, replace it with INT_MAX, in the poll() code path. Add an unit test.
* getpath: fix warning typo (#126978)Filipe Laíns 🇵🇸2024-11-181-1/+1
|
* GH-126795: Increase the JIT threshold from 16 to 4096 (GH-126816)Brandt Bucher2024-11-181-1/+1
|
* GH-126491: GC: Mark objects reachable from roots before doing cycle ↵Mark Shannon2024-11-181-0/+7
| | | | | | | | | | | | | | | | collection (GH-126502) * Mark almost all reachable objects before doing collection phase * Add stats for objects marked * Visit new frames before each increment * Remove lazy dict tracking * Update docs * Clearer calculation of work to do.
* gh-101955: Fix SystemError in possesive quantifier with alternative and ↵Serhiy Storchaka2024-11-181-0/+18
| | | | | group (GH-111362) Co-authored-by: <wjssz@users.noreply.github.com>
* gh-67877: Fix memory leaks in terminated RE matching (GH-126840)Serhiy Storchaka2024-11-184-14/+205
| | | | | | | | If SRE(match) function terminates abruptly, either because of a signal or because memory allocation fails, allocated SRE_REPEAT blocks might be never released. Co-authored-by: <wjssz@users.noreply.github.com>
* gh-126554: ctypes: Correctly handle NULL dlsym values (GH-126555)George Alexopoulos2024-11-152-31/+95
| | | | | | | | | | | | | | | | | | | | | | | | | For dlsym(), a return value of NULL does not necessarily indicate an error [1]. Therefore, to avoid using stale (or NULL) dlerror() values, we must: 1. clear the previous error state by calling dlerror() 2. call dlsym() 3. call dlerror() If the return value of dlerror() is not NULL, an error occured. In ctypes we choose to treat a NULL return value from dlsym() as a "not found" error. This is the same as the fallback message we use on Windows, Cygwin or when getting/formatting the error reason fails. [1]: https://man7.org/linux/man-pages/man3/dlsym.3.html Signed-off-by: Georgios Alexopoulos <grgalex42@gmail.com> Signed-off-by: Georgios Alexopoulos <grgalex@ba.uoa.gr> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-126433: Update hacl-star (GH-126791)Victor Stinner2024-11-159-10/+17
| | | | Retrieve the change: "Lib_Memzero0.c: Fix compiler warning on 32-bit Windows".
* gh-124111: Update tkinter for compatibility with Tcl/Tk 9.0.0 (GH-124156)Marc Culler2024-11-141-1/+4
|
* gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792)Seth Michael Larson2024-11-134-11/+79
| | | Update libexpat to 2.6.4, make future updates easier.
* gh-123619: Add an unstable C API function for enabling deferred reference ↵Peter Bierma2024-11-132-1/+17
| | | | | | counting (GH-123635) Co-authored-by: Sam Gross <colesbury@gmail.com>
* gh-126688: Reinit import lock after fork (#126692)Sam Gross2024-11-121-0/+1
| | | | | | The PyMutex implementation supports unlocking after fork because we clear the list of waiters in parking_lot.c. This doesn't work as well for _PyRecursiveMutex because on some systems, such as SerenityOS, the thread id is not preserved across fork().
* gh-76785: Improved Subinterpreters Compatibility with 3.12 (2/2) (gh-126707)Eric Snow2024-11-125-12/+46
| | | | | | | | | These changes makes it easier to backport the _interpreters, _interpqueues, and _interpchannels modules to Python 3.12. This involves the following: * add the _PyXI_GET_STATE() and _PyXI_GET_GLOBAL_STATE() macros * add _PyXIData_lookup_context_t and _PyXIData_GetLookupContext() * add _Py_xi_state_init() and _Py_xi_state_fini()
* gh-95382: Use cache for indentations in the JSON encoder (GH-118636)Serhiy Storchaka2024-11-121-64/+118
|
* gh-126133: Only use start year in PSF copyright, remove end years (#126236)Hugo van Kemenade2024-11-123-3/+3
|
* gh-126061: Add PyLong_IsPositive/Zero/Negative() functions (#126065)RUANG (James Roy)2024-11-121-0/+27
| | | | | Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-125916: Allow functools.reduce() 'initial' to be a keyword argument (#125917)Sayandip Dutta2024-11-122-10/+39
|
* gh-126595: fix a crash when calling `itertools.count(sys.maxsize)` (#126617)Bénédikt Tran2024-11-121-0/+3
|
* gh-126405: fix use-after-free in `_asyncio.Future.remove_done_callback` ↵Kumar Aditya2024-11-121-0/+2
| | | | (#126733)
* gh-76785: Improved Subinterpreters Compatibility with 3.12 (1/2) (gh-126704)Eric Snow2024-11-111-1/+1
| | | | | | | | | These changes makes it easier to backport the _interpreters, _interpqueues, and _interpchannels modules to Python 3.12. This involves the following: * rename several structs and typedefs * add several typedefs * stop using the PyThreadState.state field directly in parking_lot.c
* gh-76785: Minor Cleanup of Exception-related Cross-interpreter State (gh-126602)Eric Snow2024-11-111-1/+1
| | | This change makes it easier to backport the _interpreters, _interpqueues, and _interpchannels modules to Python 3.12.
* gh-126654: Fix crash in several functions in `_interpreters` module (#126678)sobolevn2024-11-111-0/+5
|
* remove minor redundant code from `_asyncio` (#126578)Kumar Aditya2024-11-081-3/+1
|
* GH-107803: use circular double linked list for tasks in `_asyncio` (#126577)Kumar Aditya2024-11-081-52/+21
|