summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-132710: only use stable `_uuid.generate_time_safe()` to deduce MAC ↵Bénédikt Tran2025-08-051-8/+32
| | | | | | | | address (GH-132901) (#134704) This commit includes the original commit and the NEWS entry that was added separately. (cherry picked from commit 3bffada46728e51f84c41ecbb0d3722595693e63) (cherry picked from commit 9eb84d83e00070cec3cfe78f1d0c7a7a0fbef30f)
* [3.13] gh-135839: Fix `module_traverse` and `module_clear` in subinterp ↵sobolevn2025-08-042-8/+4
| | | | | modules (GH-135937) (GH-135943) (cherry picked from commit bcc2cbaa7f112323939e853ed69fd82f19568ccf)
* [3.13] gh-137273: Fix debug assertion failure in locale.setlocale() on ↵Miss Islington (bot)2025-08-011-0/+47
| | | | | | | | | Windows (GH-137300) (GH-137306) It happened when there were at least 16 characters after dot in the locale name. (cherry picked from commit 718e0c89ba0610bba048245028ac133bbf2d44c2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-134698: Hold a lock when the thread state is detached in ssl ↵Gregory P. Smith2025-07-272-48/+66
| | | | | | | | (GH-134724) (#137126) Lock when the thread state is detached. (cherry picked from commit e047a35b23c1aa69ab8d5da56f36319cec4d36b8) or really from the 3.14 backport fd565fdfc9c0001900d03d627e2fda83f1bcca90 Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* [3.13] gh-126662: naming consistency for `signal.ItimerError` (GH-126712) ↵Miss Islington (bot)2025-07-271-1/+1
| | | | | | | | (#137123) gh-126662: naming consistency for `signal.ItimerError` (GH-126712) (cherry picked from commit d5fa437dfb50e2e47632cdc994e3257608688f30) Co-authored-by: Stephen Morton <git@tungol.org>
* [3.13] gh-136710: Fix bad indentation in `os.chdir` docstring (GH-136721)Zachary Ware2025-07-162-4/+4
| | | | | (cherry picked from commit bde808ad6ba5eee8a6201983cf071449d7ce7e39) Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
* [3.13] gh-136549: Fix signature of threading.excepthook() (GH-136559) ↵Miss Islington (bot)2025-07-121-1/+1
| | | | | | | (GH-136590) (cherry picked from commit be2c3d284ecce67474a260b8c37e2f1e0628a9cf) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-136288: Fix error message in `_testcapi/vectorcall.c` (GH-136258) ↵Miss Islington (bot)2025-07-041-4/+4
| | | | | | | | | | (GH-136295) gh-136288: Fix error message in `_testcapi/vectorcall.c` (GH-136258) Use the %N format specifier instead of %s and `PyType_GetName`. (cherry picked from commit d1d5dce14f90d777608e4403d09079421ff55944) Co-authored-by: William S Fulton <wsf@fultondesigns.co.uk>
* [3.13] Fix comments for `heapq.siftup_max` (GH-135359) (#136233)Miss Islington (bot)2025-07-031-3/+3
| | | | | | | Fix comments for `heapq.siftup_max` (GH-135359) (cherry picked from commit 8f8bdf251a5f79d15ac2b1a6d19860033bf50c79) Co-authored-by: Alper <alperyoney@fb.com> Co-authored-by: mpage <mpage@meta.com>
* [3.13] gh-135607: remove null checking of weakref list in dealloc of ↵Victor Stinner2025-07-0119-49/+39
| | | | | | | | | | extension modules and objects (#135614) (#136126) gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614) (cherry picked from commit b1056c2a446b43452e457d5fd5f1bde66afd3883) Co-authored-by: Xuanteng Huang <44627253+xuantengh@users.noreply.github.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* [3.13] gh-108765: fix comment about macro definitions in `_stat.c` post ↵Miss Islington (bot)2025-06-271-2/+2
| | | | | | | | GH-108854 (GH-136027) (#136044) gh-108765: fix comment about macro definitions in `_stat.c` post GH-108854 (GH-136027) (cherry picked from commit 0141e7f9e66e5e5ac3949fb018dd6811cd630dca) Co-authored-by: Lee Dogeon <dev.moreal@gmail.com>
* [3.13] gh-135839: Fix `module_traverse` and `module_clear` in ↵sobolevn2025-06-251-4/+2
| | | | | `_interpchannelsmodule` (GH-135840) (#135919) (cherry picked from commit dd59c786cfb1018eb5abe877bfa7265ea9a3c2b9)
* [3.13] gh-135855: Raise TypeError When Passing Non-dict Object to ↵Brian Schubert2025-06-241-12/+10
| | | | | `_interpreters.set___main___attrs` (gh-135903) (cherry picked from commit 4e6f0d116e, AKA gh-135856)
* [3.13] gh-135698: Fix Cross-interpreter Queue.full() With Negative/Default ↵Eric Snow2025-06-231-2/+5
| | | | | | | | max_size (gh-135778) We weren't handling non-positive maxsize values (including the default) properly in Queue.full(). This change fixes that and adjusts an associated assert. (cherry picked from commit c5ea8e8, AKA gh-135724)
* [3.13] gh-135641: Fix flaky `test_capi.test_lock_two_threads` test case ↵Miss Islington (bot)2025-06-181-1/+4
| | | | | | | | (gh-135642) (gh-135688) The mutex may have the `_Py_HAS_PARKED` bit set. (cherry picked from commit 17ac3933c3c860e08f7963cf270116a39a063be7) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-135321: Always raise a correct exception for BINSTRING argument > ↵Miss Islington (bot)2025-06-111-5/+4
| | | | | | | | 0x7fffffff in pickle (GH-135322) (GH-135383) (cherry picked from commit 2b8b4774d29a707330d463f226630185cbd3ceff) Co-authored-by: Justin Applegate <70449145+Legoclones@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-135326: Restore support of __index__ in random.getrandbits() (#135332)Serhiy Storchaka2025-06-102-8/+14
|
* [3.13] gh-134160: Use PyModuleDef.m_free in the example module xxlimited ↵Miss Islington (bot)2025-06-071-3/+8
| | | | | | | | | (GH-135174) (GH-135214) gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174) (cherry picked from commit 1adca08d658ee2d520f3193960eaf3ae2ead1cef) Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
* [3.13] gh-131884: Fix incorrect formatting in json.dumps() when using indent ↵Serhiy Storchaka2025-06-051-5/+10
| | | | | | | and skipkeys=True (GH-132200) (GH-135061) (cherry picked from commit ec12559ebafca01ded22c9013de64abe535c838d) Co-authored-by: Roei Ben Artzi <155478676+roeibenartzi@users.noreply.github.com>
* [3.13] gh-135108: Fix utmp.h inclusion in posixmodule.c on NetBSD ↵Miss Islington (bot)2025-06-041-3/+3
| | | | | | | (GH-135109) (GH-135128) (cherry picked from commit 5b3865418ceb1448bfbf15cddf52c900cd5882a3) Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
* [3.13] gh-127081: use `getlogin_r` if available (gh-132751) (#135098)Sam Gross2025-06-031-0/+18
| | | | | | | The `getlogin` function is not thread-safe: replace with `getlogin_r` where available. (cherry picked from commit 1ffe913c2017b44804aca18befd45689df06c069) Co-authored-by: Duane Griffin <duaneg@dghda.com>
* [3.13] gh-133489: Remove size restrictions on getrandbits() and randbytes() ↵Serhiy Storchaka2025-06-022-16/+14
| | | | | | | (GH-133658) (GH-134965) random.getrandbits() can now generate more that 2**31 bits. random.randbytes() can now generate more that 256 MiB. (cherry picked from commit 68784fed78aa297f0de0d038742495709185bef5)
* [3.13] gh-134908: Protect `textiowrapper_iternext` with critical section ↵Sam Gross2025-06-021-1/+15
| | | | | | | | | (gh-134910) (gh-135040) The `textiowrapper_iternext` function called `_textiowrapper_writeflush`, but did not use a critical section, making it racy in free-threaded builds. (cherry picked from commit 44fb7c361cb24dcf9989a7a1cfee4f6aad5c81aa) Co-authored-by: Duane Griffin <duaneg@dghda.com>
* [3.13] gh-134696: align OpenSSL and HACL*-based hash functions constructors ↵Bénédikt Tran2025-06-0115-426/+783
| | | | | | | | | | AC signatures (GH-134713) (#134962) OpenSSL and HACL*-based hash functions constructors now support both `data` and `string` parameters. Previously these constructor functions inconsistently supported sometimes `data` and sometimes `string`, while the documentation expected `data` to be given in all cases. (cherry picked from commit c6e63d9d351f6d952000ec3bf84b3a7607989f92) (cherry picked from commit 379d0bc95646dfe923e7ea05fb7f1befbd85572d)
* [3.13] gh-134210: handle signals in `_curses.window.getch` (GH-134326) (#134784)Bénédikt Tran2025-05-272-12/+17
| | | (cherry picked from commit 51762b6cadb8f316dd783716bc5c168c2e2d07f0)
* [3.13] gh-132876: workaround broken ldexp() on Windows 10 (GH-133135) (#134685)Sergey B Kirpichev2025-05-261-0/+21
| | | | | | | | | * gh-132876: workaround broken ldexp() on Windows 10 ldexp() fails to round subnormal results before Windows 11, so hide their bug. (cherry picked from commit cf8941c60356acdd00055e5583a2d64761c34af4) Co-authored-by: Tim Peters <tim.peters@gmail.com>
* [3.13] gh-134381: Fix RuntimeError when starting not-yet started Thread ↵Miss Islington (bot)2025-05-231-0/+6
| | | | | | | after fork (gh-134514) (gh-134597) (cherry picked from commit 9a2346df861f26d5f8d054ad2f9c37134dee3822) Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
* [3.13] gh-133904: Fix `math.factorial` documentation (GH-133907) (#133922)mkaraev2025-05-122-7/+3
| | | | | | | * [3.13] gh-133904: Fix `math.factorial` documentation (GH-133907) (cherry picked from commit 27ed64575d34f04029ba1d353810f3db4f4f045b) Co-authored-by: mkaraev <maruf.karaev97@gmail.com> Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.13] gh-133009: fix UAF in `xml.etree.ElementTree.Element.__deepcopy__` ↵Miss Islington (bot)2025-05-101-7/+34
| | | | | | | | (GH-133010) (#133806) gh-133009: fix UAF in `xml.etree.ElementTree.Element.__deepcopy__` (GH-133010) (cherry picked from commit 116a9f9b3775c904c98e390d896200e1641498aa) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] gh-122559: Synchronize C and Python implementation of the io module ↵Serhiy Storchaka2025-05-043-10/+5
| | | | | | | | | | | about pickling (GH-122628) (GH-133381) In the C implementation, remove __reduce__ and __reduce_ex__ methods that always raise TypeError and restore __getstate__ methods that always raise TypeErrori. This restores fine details of the pre-3.12 behavior and unifies both implementations. (cherry picked from commit e9253ebf74433de5ae6d7f1bce693a3a1173b3b1)
* [3.13] bpo-44172: Keep reference to original window in curses subwindow ↵Serhiy Storchaka2025-05-041-8/+12
| | | | | | | | | | | | | | | | | | | objects (GH-26226) (GH-133370) The X/Open curses specification[0] and ncurses documentation[1] both state that subwindows must be deleted before the main window. Deleting the windows in the wrong order causes a double-free with NetBSD's curses implementation. To fix this, keep track of the original window object in the subwindow object, and keep a reference to the original for the lifetime of the subwindow. [0] https://pubs.opengroup.org/onlinepubs/7908799/xcurses/delwin.html [1] https://invisible-island.net/ncurses/man/curs_window.3x.html (cherry picked from commit 0af61fe2f41048d66b0a973bbff056690446d3df) Co-authored-by: Michael Forney <mforney@mforney.org>
* [3.13] gh-133290: Use PyObject_SetAttr to set _type_ (GH-133292) (GH-133295)Miss Islington (bot)2025-05-021-11/+1
| | | | | | gh-133290: Use PyObject_SetAttr to set _type_ (GH-133292) (cherry picked from commit 2590774c9bb96ec75ca8a13b0c061fcc9db3eb65) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] gh-132527: Added missing `w` typecode to array() error message ↵Miss Islington (bot)2025-04-251-1/+1
| | | | | | | | (GH-132529) (#132938) Co-authored-by: Christian Veenhuis <124370897+ChVeen@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
* [3.13] gh-132753: Argument Clinic: Fix support of c_default for the bool ↵Serhiy Storchaka2025-04-212-1/+79
| | | | | converter (GH-132754) (GH-132766) (cherry picked from commit 78cfee6f0920ac914ed179c013f61c53ede16fa9)
* [3.13] gh-132673: Fix a crash with zero-alignment in `ctypes.Structure` ↵Peter Bierma2025-04-191-1/+2
| | | | (#132695)
* [3.13] gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux ↵Miss Islington (bot)2025-04-181-1/+1
| | | | | | | | | | (GH-129721) (#132702) gh-129719: Restore missing `socket.CAN_RAW_ERR_FILTER` on Linux (GH-129721) (cherry picked from commit ce31ae5209c976d28d1c21fcbb06c0ae5e50a896) Co-authored-by: Jeroen Bogers <11465689+jbogers@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
* [3.13] gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded ↵Miss Islington (bot)2025-04-181-2/+2
| | | | | | | | build (GH-132675) (#132677) gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded build (GH-132675) (cherry picked from commit 2df0f8804701cc17674e5b4e90499e9fac71d0e1) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] gh-130052: Fix search_map_for_section() error handling (GH-132594) ↵Miss Islington (bot)2025-04-161-1/+3
| | | | | | | | | | | (#132598) gh-130052: Fix search_map_for_section() error handling (GH-132594) * Don't call close() if the file descriptor is negative. * If close() fails, chain the existing exception. (cherry picked from commit 014c7f90478780b18d0e33d456483178c8dcc665) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] gh-132099: Harmonize Bluetooth address handling (GH-132486) (GH-132497)Serhiy Storchaka2025-04-141-22/+21
| | | | | | | | | | | Now all protocols always accept the Bluetooth address as string and getsockname() always returns the Bluetooth address as string. * BTPROTO_SCO now accepts not only bytes, but str. * BTPROTO_SCO now checks address for embedded null. * On *BSD, BTPROTO_HCI now accepts str instead of bytes. * On FreeBSD, getsockname() for BTPROTO_HCI now returns str instead of bytes. * On NetBSD and DragonFly BSD, BTPROTO_HCI now checks address for embedded null. (cherry picked from commit 1fc1df8dcc7a853b0649bc8df37cd07cbd2b6230)
* [3.13] gh-132429: Fix support of Bluetooth sockets on NetBSD and DragonFly ↵Serhiy Storchaka2025-04-122-67/+77
| | | | | | BSD (GH-132431) (GH-132458) Also fix a compiler warning on FreeBSD. (cherry picked from commit f2f86d3f459a89273ea22389bb57eed402908302)
* [3.13] GH-132417: ctypes: Fix potential `Py_DECREF(NULL)` when handling ↵Miss Islington (bot)2025-04-121-3/+4
| | | | | | | | | | functions returning `PyObject *` (GH-132418) (#132425) GH-132417: ctypes: Fix potential `Py_DECREF(NULL)` when handling functions returning `PyObject *` (GH-132418) Some functions (such as `PyErr_Occurred`) with a `restype` set to `ctypes.py_object` may return NULL without setting an exception. (cherry picked from commit 2aab2db1461ef49b42549255af16a74b1bf8a5ef) Co-authored-by: Nicolas Trangez <ikke@nicolast.be>
* [3.13] gh-131127: Minimal build support on systems using LibreSSL ↵Miss Islington (bot)2025-04-111-1/+1
| | | | | | | (GH-131128) (GH-132392) (cherry picked from commit 1b49c8c71b90bfa97df5633e2bbf51d4a6e22a57) Co-authored-by: Collin Funk <collin.funk1@gmail.com>
* [3.13] gh-132250: Clear error in lsprof callback when method descriptor ↵Miss Islington (bot)2025-04-081-0/+1
| | | | | | | | raises an excep… (GH-132251) (#132281) gh-132250: Clear error in lsprof callback when method descriptor raises an excep… (GH-132251) (cherry picked from commit ab64130b572424695bf072f7608a536997dce14f) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.13] gh-132174: Fix function name in error message of ↵Miss Islington (bot)2025-04-081-1/+1
| | | | | | | | | `_interpreters.run_string` (GH-132175) (#132209) gh-132174: Fix function name in error message of `_interpreters.run_string` (GH-132175) (cherry picked from commit f2daa96c81a45b26bdcf3d5c3887cec02137974e) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
* [3.13] gh-131809: Upgrade vendored expat to 2.7.1 (GH-132192) (#132236)Miss Islington (bot)2025-04-074-10/+19
| | | | | | | | | | | | * gh-131809: Upgrade vendored expat to 2.7.1 (GH-132192) (cherry picked from commit c0de6500249469e6fc5b458d6afb6bad1b6755cd) Co-authored-by: Gregory P. Smith <greg@krypto.org> * make regen-sbom --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.13] gh-132171: Fix `_interpreters.run_string` crash on string subclass ↵Miss Islington (bot)2025-04-071-1/+1
| | | | | | | | (GH-132173) (#132219) gh-132171: Fix `_interpreters.run_string` crash on string subclass (GH-132173) (cherry picked from commit 398071871066548954f4c51e8250d13b7c9659e0) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.13] gh-122040: reword `Modules/xxmodule.c` module-level comment ↵Miss Islington (bot)2025-04-071-2/+1
| | | | | | | | (GH-132201) (#132207) gh-122040: reword `Modules/xxmodule.c` module-level comment (GH-132201) (cherry picked from commit af8d1b95377917036aaedf18b9cc047d8877259c) Co-authored-by: Sonny Ding <93831983+sonnyding1@users.noreply.github.com>
* [3.13] gh-132075: Fix possible use of sockaddr structures with uninitialized ↵Miss Islington (bot)2025-04-041-0/+13
| | | | | | | | members (GH-132076) (GH-132086) Now all structure members are initialized with zeroes by default. (cherry picked from commit 345baa77ba2ce3b8ea8f2fad84754e5cc0b10938) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-111178: Fix getsockaddrarg() undefined behavior (#131668) (#131977)Victor Stinner2025-04-011-11/+49
| | | | | | | | | | | | gh-111178: Fix getsockaddrarg() undefined behavior (#131668) Don't pass direct references to sockaddr members since their type may not match PyArg_ParseTuple() types. Instead, use temporary 'int' and 'unsigned char' variables, and update sockaddr members afterwards. On FreeBSD, treat BTPROTO_HCI node name as a bytes string, not as an integer. (cherry picked from commit 8cd29c2b533e5a1a262238695d05f2a7c44d6455)
* [3.13] gh-131936: Strengthen check in `_suggestions._generate_suggestions` ↵Miss Islington (bot)2025-03-311-1/+1
| | | | | | | | (GH-131945) (#131949) gh-131936: Strengthen check in `_suggestions._generate_suggestions` (GH-131945) (cherry picked from commit 511d3440a0bbb19731f4d96dde65dffbf85cdda5) Co-authored-by: Peter Bierma <zintensitydev@gmail.com>