summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in a comment in Modules/_ssl.c: s/validata/validate/ (GH-27993) ↵Miss Islington (bot)2021-09-061-1/+1
| | | | | (GH-27997) (cherry picked from commit 28db1f61f20352c02e4ae1518e5aeb6505df3045)
* [3.10] bpo-45060: Get rid of few uses of the equality operators with None ↵Serhiy Storchaka2021-09-042-4/+4
| | | | | | | (GH-28087). (GH-28092) (cherry picked from commit 3c65457156d87e55010507d616b4eecb7a02883d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-44689: ctypes.util.find_library() now finds macOS 11+ system libraries ↵Miss Islington (bot)2021-08-301-3/+26
| | | | | | | | when built on older macOS systems (GH-27251) Previously, when built on older macOS systems, `find_library` was not able to find macOS system libraries when running on Big Sur due to changes in how system libraries are stored. (cherry picked from commit 71853a73024a98aa38a3c0444fe364dbd9709134) Co-authored-by: Tobias Bergkvist <tobias@bergkv.ist>
* bpo-44394: Update libexpat copy to 2.4.1 (GH-26945)Miss Islington (bot)2021-08-2920-177/+1368
| | | | | | | | | | Update the vendored copy of libexpat to 2.4.1 (from 2.2.8) to get the fix for the CVE-2013-0340 "Billion Laughs" vulnerability. This copy is most used on Windows and macOS. Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 3fc5d84046ddbd66abac5b598956ea34605a4e5d) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.10] bpo-27334: roll back transaction if sqlite3 context manager fails to ↵Erlend Egeberg Aasland2021-08-281-7/+22
| | | | commit (GH-26202) (GH-27943)
* bpo-44984: Rewrite test_null_strings in _testcapi (GH-27904)Miss Islington (bot)2021-08-231-8/+16
| | | | | | Test also PyObject_Repr(NULL) and PyObject_Bytes(NULL). (cherry picked from commit 4d689173861257c69adc6dc1dca4171946ddb57f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-44822: Don't truncate `str`s with embedded NULL chars returned by ↵Miss Islington (bot)2021-08-061-3/+10
| | | | | | | `sqlite3` UDF callbacks (GH-27588) (cherry picked from commit 8f010dc920e1f6dc6a357e7cc1460a7a567c05c6) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* Update URLs in comments and metadata to use HTTPS (GH-27458) (GH-27478)Miss Islington (bot)2021-07-304-4/+4
| | | | | (cherry picked from commit be42c06bb01206209430f3ac08b72643dc7cad1c) Co-authored-by: Noah Kantrowitz <noah@coderanger.net>
* [3.10] bpo-31746: Prevent segfaults when sqlite3.Connection is uninitialised ↵Erlend Egeberg Aasland2021-07-301-7/+22
| | | | | | | (GH-27431). (GH-27472) (cherry picked from commit 7e311e496b0e26b3d3c62fe9b0ed2a4677c37ee9) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-40263: Fixes an off-by-one error in _winapi_WaitForMultipleObjects_impl ↵Miss Islington (bot)2021-07-281-1/+1
| | | | | | | (GH-19501) (cherry picked from commit 92b5dc780db968f6277f42cb06926dddb7475dc6) Co-authored-by: Ray Donnelly <mingw.android@gmail.com>
* bpo-44740: Lowercase "internet" and "web" where appropriate. (GH-27378) ↵Miss Islington (bot)2021-07-261-1/+1
| | | | | | | | (GH-27380) Co-authored-by: Łukasz Langa <lukasz@langa.pl> (cherry picked from commit 11749e2dc20ad6a76e9a39e948853e89b2b4bbed) Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and ↵Miss Islington (bot)2021-07-232-12/+12
| | | | | | | | | _ssl._SSLSocket.write (GH-27271) (GH-27308) (cherry picked from commit 83d1430ee5b8008631e7f2a75447e740eed065c1) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make ↵Miss Islington (bot)2021-07-231-2/+1
| | | | | | | | | | | | | | | Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260) (GH-27306) * Remove code that checks Py_TPFLAGS_HAVE_VERSION_TAG The field is always present in the type struct, as explained in the added comment. * Remove Py_TPFLAGS_HAVE_AM_SEND The flag is not needed, and since it was added in 3.10 it can be removed now. (cherry picked from commit a4760cc32d9e5dac7be262e9736eb30502cd7be3) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* bpo-34932: Add socket.TCP_KEEPALIVE for macOS (GH-25079)Miss Islington (bot)2021-07-141-0/+4
| | | | | (cherry picked from commit d59d7374a364c4e5c2b9a83d8e4543ee494285b8) Co-authored-by: Shane Harvey <shnhrv@gmail.com>
* [3.10] Fix docstring typo in ↵Erlend Egeberg Aasland2021-07-144-8/+8
| | | | | | | | sqlite3.Connection.executescript/sqlite3.Cursor.executescript (GH-27147) (GH-27151) Both `executescript` methods contain the same docstring typo: _"Executes a multiple SQL statements at once."_ => _"Executes multiple SQL statements at once."_ Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)Miss Islington (bot)2021-07-141-1/+3
| | | | | | if it is called with a sequence or set, but not list or tuple. (cherry picked from commit f572cbf1faab33d9afbbe3e95738ed6fbe6e48e6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] bpo-44630: Fix assertion errors in csv module (GH-27127) (GH-27129)Miss Islington (bot)2021-07-131-4/+8
| | | | | | | | | | | | | | | | | | | Fix incorrect handling of exceptions when interpreting dialect objects in the csv module. Not clearing exceptions between calls to PyObject_GetAttrString() causes assertion failures in pydebug mode (or with assertions enabled). Add a minimal test that would've caught this (passing None as dialect, or any object that isn't a csv.Dialect subclass, which the csv module allows and caters to, even though it is not documented.) In pydebug mode, the test triggers the assertion failure in the old code. Contributed-By: T. Wouters [Google] (cherry picked from commit 0093876328afa330224c9d887c18dee0b3117852) Co-authored-by: T. Wouters <thomas@python.org> Automerge-Triggered-By: GH:gpshead
* bpo-29753: revert 0d7ad9f (GH-19850) (GH-27085)Miss Islington (bot)2021-07-111-27/+8
| | | | | | | | This reverts commit 0d7ad9fb38c041c46094087b0cf2c8ce44916b11 as it has a regression. See https://github.com/python/cpython/pull/19850GH-issuecomment-869410686 (cherry picked from commit e14d5ae5447ae28fc4828a9cee8e9007f9c30700) Co-authored-by: Filipe Laíns <lains@archlinux.org>
* bpo-44582: Accelerate mimetypes.init on Windows with a native accelerator ↵Miss Islington (bot)2021-07-082-1/+145
| | | | | | | (GH-27059) (cherry picked from commit bbf2fb6c7ae78f40483606f467739a58cd747270) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)Miss Islington (bot)2021-07-072-4/+4
| | | | | (cherry picked from commit 6bd3ecfc272b122b55a6adec50dd7a7c868f262f) Co-authored-by: Rupert Tombs <rupert.tombs@gmail.com>
* bpo-44563: Fix error handling in tee.fromiterable() (GH-27020) (GH-27041)Miss Islington (bot)2021-07-051-9/+10
| | | | | | | | In debug build failed tee.fromiterable() corrupted the linked list of all GC objects. (cherry picked from commit f64de53ff01e734d48d1d42195443d7d1646f220) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer ↵Miss Islington (bot)2021-07-051-30/+114
| | | | | | | | | | | | | | | | | | | (GH-26143) * zlib uses an UINT32_MAX sliding window for the output buffer These funtions have an initial output buffer size parameter: - zlib.decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE) - zlib.Decompress.flush([length]) If the initial size > UINT32_MAX, use an UINT32_MAX sliding window, instead of clamping to UINT32_MAX. Speed up when (the initial size == the actual size). This fixes a memory consumption and copying performance regression in earlier 3.10 beta releases if someone used an output buffer larger than 4GiB with zlib.decompress. Reviewed-by: Gregory P. Smith (cherry picked from commit a9a69bb3ea1e6cf54513717212aaeae0d61b24ee) Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
* bpo-43977: Properly update the tp_flags of existing subclasses when their ↵Miss Islington (bot)2021-06-251-6/+31
| | | | | | | parents are registered (GH-26864) (cherry picked from commit ca2009d72a52a98bf43aafa9ad270a4fcfabfc89) Co-authored-by: Brandt Bucher <brandt@python.org>
* bpo-41621: Document defaultdict's default_factory parameter (GH-21945)Miss Islington (bot)2021-06-231-1/+1
| | | | | | It defaults to None and is positional only. (cherry picked from commit d1ae57027fc39ff60dcfc1b63881400e5ca3ce56) Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
* bpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758) (GH-26824)Miss Islington (bot)2021-06-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | _thread.start_new_thread() no longer calls PyThread_exit_thread() explicitly at the thread exit, the call was redundant. On Linux with the glibc, pthread_cancel() loads dynamically the libgcc_s.so.1 library. dlopen() can fail if there is no more available file descriptor to open the file. In this case, the process aborts with the error message: "libgcc_s.so.1 must be installed for pthread_cancel to work" pthread_cancel() unwinds back to the thread's wrapping function that calls the thread entry point. The unwind function is dynamically loaded from the libgcc_s library since it is tightly coupled to the C compiler (GCC). The unwinder depends on DWARF, the compiler generates DWARF, so the unwinder belongs to the compiler. Thanks Florian Weimer and Carlos O'Donell for their help on investigating this issue. (cherry picked from commit 45a78f906d2d5fe5381d78466b11763fc56d57ba) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.10] bpo-44087: Disallow instantiation of sqlite3.Statement (GH-26567) ↵Erlend Egeberg Aasland2021-06-201-1/+1
| | | | | (GH-26816) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-44077: Expose IP_RECVTOS in the socket module (GH-25992)Miss Islington (bot)2021-06-201-0/+3
| | | | | | Co-authored-by: Pablo Galindo <pablogsal@gmail.com> (cherry picked from commit a317778fd58b1c6b250feffbdb4ecf15e293ef48) Co-authored-by: Georg Sauthoff <mail@georg.so>
* bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) ↵Miss Islington (bot)2021-06-1722-38/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-26766) * Make functools types immutable * Multibyte codec types are now immutable * pyexpat.xmlparser is now immutable * array.arrayiterator is now immutable * _thread types are now immutable * _csv types are now immutable * _queue.SimpleQueue is now immutable * mmap.mmap is now immutable * unicodedata.UCD is now immutable * sqlite3 types are now immutable * _lsprof.Profiler is now immutable * _overlapped.Overlapped is now immutable * _operator types are now immutable * winapi__overlapped.Overlapped is now immutable * _lzma types are now immutable * _bz2 types are now immutable * _dbm.dbm and _gdbm.gdbm are now immutable (cherry picked from commit 00710e6346fd2394aa020b2dfae170093effac98) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-44389: Fix typo in ssl deprecation warning message (GH-26754)Miss Islington (bot)2021-06-171-1/+1
| | | | | | `ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`. (cherry picked from commit c544393b89f9b3e2b1a22588fc9ae58019314879) Co-authored-by: Joe <nigelchiang@outlook.com>
* bpo-42972: _thread.RLock implements the GH protocol (GH-26734)Miss Islington (bot)2021-06-151-1/+10
| | | | | | | The _thread.RLock type now fully implement the GC protocol: add a traverse function and the Py_TPFLAGS_HAVE_GC flag. (cherry picked from commit 1cd3d859a49b047dd08abb6f44f0539564d3525a) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.10] bpo-44389: Fix deprecation of OP_NO_TLSv1_3 (GH-26700) (GH-26705)Miss Islington (bot)2021-06-131-1/+1
| | | | | | | | | Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit bf527277d4e4907e32d76ca7ba667ab3149fe258) Co-authored-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: GH:tiran
* bpo-44389: Remove duplicate SSL_OP_NO_TLSv1_2 flag (GH-26680)Miss Islington (bot)2021-06-131-1/+1
| | | | | (cherry picked from commit cb7230c7a7d6d497e54c25e9ba640eec79de10f2) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* [3.10] Add more const modifiers. (GH-26691). (GH-26692)Serhiy Storchaka2021-06-121-2/+2
| | | | | (cherry picked from commit be8b631b7a587aa781245e14c8cca32970e1be5b) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-44362: ssl: improve deprecation warnings and docs (GH-26646)Miss Islington (bot)2021-06-111-14/+28
| | | | | | Signed-off-by: Christian Heimes <christian@python.org> (cherry picked from commit e26014f1c47d26d6097ff7a0f25384bfbde714a9) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-44363: Get test_capi passing with address sanitizer (GH-26639)Miss Islington (bot)2021-06-101-0/+5
| | | | | (cherry picked from commit 31aa0dbff4c1d39c9d77c6c8f4a61d0e46c1268b) Co-authored-by: Mark Shannon <mark@hotpy.org>
* bpo-44227: Update bisect docstrings (GH-26548) (GH-26563)Miss Islington (bot)2021-06-062-11/+11
|
* bpo-44304: Ensure the sqlite3 destructor callback is always called with the ↵Miss Islington (bot)2021-06-052-0/+7
| | | | | | | GIL held (GH-26551) (GH_26552) (cherry picked from commit 6e3b7cf3af3ed7758b2c2193c1d393feb8ab8f72) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement ↵Miss Islington (bot)2021-06-051-7/+4
| | | | | | | objects (GH-26545) (cherry picked from commit fa106a685c1f199aca5be5c2d0277a14cc9057bd) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-43853: Handle sqlite3_value_text() errors (GH-25422)Miss Islington (bot)2021-06-041-8/+11
| | | | | (cherry picked from commit 006fd869e4798b68e266f5de89c83ddb531a756b) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* [3.10] bpo-42972: Track sqlite3 statement objects (GH-26475) (GH-26515)Erlend Egeberg Aasland2021-06-034-48/+40
| | | | | | | | | | | | | | Allocate and track statement objects in pysqlite_statement_create. By allocating and tracking creation of statement object in pysqlite_statement_create(), the caller does not need to worry about GC syncronization, and eliminates the possibility of getting a badly created object. All related fault handling is moved to pysqlite_statement_create(). Co-authored-by: Victor Stinner <vstinner@python.org>. (cherry picked from commit fffa0f92adaaed0bcb3907d982506f78925e9052) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-44285: getpath.c: Assert that env_file is NULL during an error check ↵Miss Islington (bot)2021-06-021-0/+1
| | | | | | | | (GH-26486) This was flagged by a static analyzer, but the logic of why this is NULL on error is hard to follow for humans as well. (cherry picked from commit bdb56902a3bfe12b10f85a941d5dd0eae739f1a8) Co-authored-by: stratakis <cstratak@redhat.com>
* bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464) (GH-26465)Miss Islington (bot)2021-05-312-2/+9
| | | | | | | | | | | * _testcapi.heapgctype: implement a traverse function since the type is defined with Py_TPFLAGS_HAVE_GC. * _decimal: PyDecSignalDictMixin_Type is no longer defined with Py_TPFLAGS_HAVE_GC since it has no traverse function. (cherry picked from commit 142e5c5445c019542246d93fe2f9e195d3131686) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-42972: Fully implement GC protocol for xxlimited (GH-26451) (GH-26460)Miss Islington (bot)2021-05-312-0/+16
| | | | | | | (cherry picked from commit 4b20f2574d412f4c4a5b1ab799d8e71a5dd3b766) Co-authored-by: Hai Shi <shihai1992@gmail.com> Co-authored-by: Hai Shi <shihai1992@gmail.com>
* bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452) (GH-26461)Miss Islington (bot)2021-05-316-41/+44
| | | | | (cherry picked from commit d1124b09e8251061dc040cbd396f35ae57783f4a) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-44252: Correctly implement gc support for SSLError objects (GH-26439) ↵Miss Islington (bot)2021-05-281-2/+1
| | | | | | | (GH-26441) (cherry picked from commit 8b4312b909abff3100c1f18fb3efa5c25617fee3) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* [3.10] bpo-42972: Fully support GC for _winapi.Overlapped (GH-26381) (#26430)Ken Jin2021-05-281-2/+46
| | | | | * bpo-42972: Fully support GC for _winapi.Overlapped (GH-26381) * untrack earlier
* bpo-42972: Fully implement GC protocol for functools LRU cache (GH-26423)Miss Islington (bot)2021-05-281-2/+4
| | | | | (cherry picked from commit 3f8d33252722750e6c019d3df7ce0fabf7bdd45e) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-42972: Fully implement GC protocol for functools keywrapper and partial ↵Miss Islington (bot)2021-05-281-22/+37
| | | | | | | types (GH-26363) (GH-26424) (cherry picked from commit 8994e9c2cd775ddf7b0723824da53fe0d7c039ac) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-44256: Do not expose _functools._list_elem_type (GH-26416)Miss Islington (bot)2021-05-281-3/+2
| | | | | | It is internal use only type. (cherry picked from commit 28be3191a9db2769ed05e55c6bcbccdd029656dd) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* bpo-42972: Fully implement GC protocol for re types (GH-26368) (GH-26414)Miss Islington (bot)2021-05-281-19/+81
| | | | | (cherry picked from commit fba42d11880f444bb94d9891e3949f082a57b9a9) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>