summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-42035: Enhance test_get_type_name() of _testcapi (GH-27649)Hai Shi2021-08-171-0/+14
|
* bpo-42035: Add PyType_GetQualName() to get a type's qualified name. (GH-27551)Hai Shi2021-08-171-0/+41
|
* bpo-44914: Add tests for some invariants of tp_version_tag (GH-27774)Ken Jin2021-08-161-0/+18
|
* bpo-44890: collect specialization stats if Py_DEBUG (GH-27731)Irit Katriel2021-08-121-1/+1
|
* bpo-44854: Remove trailing whitespaces (GH-27689)Serhiy Storchaka2021-08-094-4/+4
|
* bpo-44859: Improve error handling in sqlite3 and and raise more accurate ↵Serhiy Storchaka2021-08-084-33/+52
| | | | | | | | | | | | | | | | | | | | exceptions. (GH-27654) * MemoryError is now raised instead of sqlite3.Warning when memory is not enough for encoding a statement to UTF-8 in Connection.__call__() and Cursor.execute(). * UnicodEncodeError is now raised instead of sqlite3.Warning when the statement contains surrogate characters in Connection.__call__() and Cursor.execute(). * TypeError is now raised instead of ValueError for non-string script argument in Cursor.executescript(). * ValueError is now raised for script containing the null character instead of truncating it in Cursor.executescript(). * Correctly handle exceptions raised when getting boolean value of the result of the progress handler. * Add many tests covering different corner cases. Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-42971: Add errno.EQFULL (macOS) (GH-24419)Ronald Oussoren2021-08-061-0/+3
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44839: Raise more specific errors in sqlite3 (GH-27613)Serhiy Storchaka2021-08-061-36/+31
| | | | | | MemoryError raised in user-defined functions will now preserve its type. OverflowError will now be converted to DataError. Previously both were converted to OperationalError.
* bpo-44822: Don't truncate `str`s with embedded NULL chars returned by ↵Erlend Egeberg Aasland2021-08-051-3/+10
| | | | `sqlite3` UDF callbacks (GH-27588)
* bpo-41117: Cleanup subtract_refs() (GH-27593)Victor Stinner2021-08-041-3/+3
| | | | | | subtract_refs() reuses the 'op' variable rather than calling the FROM_GC() macro twice. Issue reported by William Pickard.
* Update URLs in comments and metadata to use HTTPS (GH-27458)Noah Kantrowitz2021-07-304-4/+4
|
* bpo-31746: Fix broken call in GH-27431 (GH-27464)Erlend Egeberg Aasland2021-07-291-1/+1
|
* bpo-31746: Prevent segfaults when sqlite3.Connection is uninitialised (GH-27431)Erlend Egeberg Aasland2021-07-291-7/+23
|
* bpo-44725 : expose specialization stats in python (GH-27192)Irit Katriel2021-07-292-1/+39
|
* bpo-42064: Optimise `sqlite3` state access, part 1 (GH-27273)Erlend Egeberg Aasland2021-07-2913-66/+103
| | | | | | | | | | Prepare for module state: - Add "get state by defining class" and "get state by module def" stubs - Add AC defining class when needed - Add state pointer to connection context - Pass state as argument to utility functions Automerge-Triggered-By: GH:encukou
* bpo-42035: Add a PyType_GetName() to get type's short name. (GH-23903)Hai Shi2021-07-291-0/+41
|
* bpo-44688: Remove ASCII limitation from `sqlite3` collation names (GH-27395)Erlend Egeberg Aasland2021-07-292-57/+22
|
* bpo-40263: Fixes an off-by-one error in _winapi_WaitForMultipleObjects_impl ↵Ray Donnelly2021-07-281-1/+1
| | | | (GH-19501)
* closes bpo-44751: Move crypt.h include from public header to _cryptmodule ↵Geoffrey Thomas2021-07-271-0/+3
| | | | | (GH-27394) Automerge-Triggered-By: GH:benjaminp
* bpo-42064: Migrate to `sqlite3_create_collation_v2` (GH-27156)Erlend Egeberg Aasland2021-07-272-27/+17
| | | | | | This implies that SQLite now takes care of destroying the callback context (the PyObject callable it has been passed), so we can strip the collation dict from the connection object.
* bpo-44740: Lowercase "internet" and "web" where appropriate. (#27378)Mariusz Felisiak2021-07-261-1/+1
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-44590: Lazily allocate frame objects (GH-27077)Mark Shannon2021-07-263-18/+20
| | | | | | | | | | | | | | * Convert "specials" array to InterpreterFrame struct, adding f_lasti, f_state and other non-debug FrameObject fields to it. * Refactor, calls pushing the call to the interpreter upward toward _PyEval_Vector. * Compute f_back when on thread stack, only filling in value when frame object outlives stack invocation. * Move ownership of InterpreterFrame in generator from frame object to generator object. * Do not create frame objects for Python calls. * Do not create frame objects for generators.
* bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and ↵Pablo Galindo Salgado2021-07-232-12/+12
| | | | _ssl._SSLSocket.write (GH-27271)
* bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make ↵Petr Viktorin2021-07-231-2/+1
| | | | | | | | | | | | Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260) * 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.
* bpo-44353: Implement typing.NewType __call__ method in C (#27262)Yurii Karabas2021-07-223-0/+72
| | | | Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Denis Laxalde <denis@laxalde.org>
* bpo-42064: Finalise establishing sqlite3 global state (GH-27155)Erlend Egeberg Aasland2021-07-206-53/+69
| | | | | | With this, all sqlite3 static globals have been moved to the global state. There are a couple of global static strings left, but there should be no need for adding them to the state. https://bugs.python.org/issue42064
* bpo-44678: Separate error message for discontinuous padding in ↵Idan Moral2021-07-191-2/+5
| | | | | | | binascii.a2b_base64 strict mode (GH-27249) * Renamed assertLeadingPadding function to match logic * Added a separate error message for discontinuous padding * Updated the tests for discontinuous padding
* bpo-43086: Add handling for out-of-spec data in a2b_base64 (GH-24402)Idan Moral2021-07-192-14/+75
| | | | | | | binascii.a2b_base64 gains a strict_mode= parameter. When enabled it will raise an error on input that deviates from the base64 spec in any way. The default remains False for backward compatibility. Code reviews and minor tweaks by: Gregory P. Smith <greg@krypto.org> [Google]
* bpo-44641: Use vectorcall in sqlite3 collation callback (GH-27158)Erlend Egeberg Aasland2021-07-151-3/+3
|
* bpo-34932: Add socket.TCP_KEEPALIVE for macOS (GH-25079)Shane Harvey2021-07-141-0/+4
|
* Fix docstring typo in ↵Erlend Egeberg Aasland2021-07-144-8/+8
| | | | | | | | sqlite3.Connection.executescript/sqlite3.Cursor.executescript (GH-27147) Both `executescript` methods contain the same docstring typo: _"Executes a multiple SQL statements at once."_ => _"Executes multiple SQL statements at once."_ Automerge-Triggered-By: GH:pablogsal
* bpo-42064: Move `sqlite3` exceptions to global state, part 2 of 2 (GH-26884)Erlend Egeberg Aasland2021-07-147-82/+90
| | | Automerge-Triggered-By: GH:encukou
* bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)Serhiy Storchaka2021-07-141-1/+3
| | | | if it is called with a sequence or set, but not list or tuple.
* bpo-44630: Fix assertion errors in csv module (GH-27127)T. Wouters2021-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]
* bpo-29753: revert 0d7ad9f (GH-19850) (GH-27085)Filipe Laíns2021-07-111-27/+8
| | | | | This reverts commit 0d7ad9fb38c041c46094087b0cf2c8ce44916b11 as it has a regression. See https://github.com/python/cpython/pull/19850#issuecomment-869410686
* Remove irrelevant comment which was added in 2a70a3a (GH-27044)Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)2021-07-091-1/+0
|
* bpo-44582: Accelerate mimetypes.init on Windows with a native accelerator ↵Steve Dower2021-07-082-1/+145
| | | | (GH-27059)
* bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)Rupert Tombs2021-07-072-4/+4
|
* bpo-44563: Fix error handling in tee.fromiterable() (GH-27020)Serhiy Storchaka2021-07-051-9/+10
| | | In debug build failed tee.fromiterable() corrupted the linked list of all GC objects.
* bpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer ↵Ma Lin2021-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
* bpo-44434: Remove useless calls to PyThread_exit_thread() (GH-26943)Victor Stinner2021-06-291-2/+0
| | | | | | Remove useless calls to PyThread_exit_thread() in two unit tests of _testcapi and _testembed modules. Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
* bpo-43977: Properly update the tp_flags of existing subclasses when their ↵Brandt Bucher2021-06-251-6/+31
| | | | parents are registered (GH-26864)
* bpo-44321: Adds `os.EX_OK` for Windows (GH-26559)Samuel Marks2021-06-241-0/+4
|
* bpo-44491: Allow clearing the sqlite3 authoriser callback (GH-26863)Erlend Egeberg Aasland2021-06-241-6/+10
|
* bpo-42064: Move `sqlite3` exceptions to global state, part 1 of 2 (GH-26745)Erlend Egeberg Aasland2021-06-236-39/+49
| | | Also adds a test to verify the (borrowed) exceptions in `sqlite3.Connection`.
* bpo-42064: Remove stale extern declarations in `sqlite3` headers (GH-26840)Erlend Egeberg Aasland2021-06-235-10/+0
|
* bpo-41621: Document defaultdict's default_factory parameter (GH-21945)Dennis Sweeney2021-06-221-1/+1
| | | It defaults to None and is positional only.
* bpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758)Victor Stinner2021-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.
* bpo-44077: Expose IP_RECVTOS in the socket module (GH-25992)Georg Sauthoff2021-06-201-0/+3
| | | Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-44087: Disallow instantiation of sqlite3.Statement (GH-26567)Erlend Egeberg Aasland2021-06-201-1/+1
|