summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-45094: Add Py_NO_INLINE macro (GH-28140)Victor Stinner2021-09-033-4/+4
| | | | | * Rename _Py_NO_INLINE macro to Py_NO_INLINE: make it public and document it. * Sort macros in the C API documentation.
* bpo-45082: Cleanup ctypes.c_buffer alias (GH-28129)Victor Stinner2021-09-021-2/+2
| | | | | * Remove commented deprecation of ctypes.c_buffer. * Remove references to ctypes.c_string which doesn't exist. * Remove StringTestCase: it only had skipped test methods.
* bpo-43613: Faster implementation of gzip.compress and gzip.decompress (GH-27941)Ruben Vorderman2021-09-022-13/+28
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-37330: open() no longer accept 'U' in file mode (GH-28118)Victor Stinner2021-09-022-29/+3
| | | | | open(), io.open(), codecs.open() and fileinput.FileInput no longer accept "U" ("universal newline") in the file mode. This flag was deprecated since Python 3.3.
* bpo-45085: Remove the binhex module (GH-28117)Victor Stinner2021-09-022-558/+1
| | | | | | | | | | The binhex module, deprecated in Python 3.9, is now removed. The following binascii functions, deprecated in Python 3.9, are now also removed: * a2b_hqx(), b2a_hqx(); * rlecode_hqx(), rledecode_hqx(). The binascii.crc_hqx() function remains available.
* bpo-45060: Get rid of few uses of the equality operators with None (GH-28087)Serhiy Storchaka2021-08-312-4/+4
|
* bpo-42064: Offset arguments for PyObject_Vectorcall in the _sqlite module ↵Petr Viktorin2021-08-312-10/+14
| | | | | | | (GH-27931) This allows e.g. methods to be called efficiently by providing space for a "self" argument; see PY_VECTORCALL_ARGUMENTS_OFFSET docs.
* bpo-44991: Make GIL handling more explicit in `sqlite3` callbacks (GH-27934)Erlend Egeberg Aasland2021-08-311-35/+27
| | | | | | | | - acquire the GIL at the very start[1] - release the GIL at the very end [1] The trace callback performs a sanity check before acquiring the GIL Automerge-Triggered-By: GH:encukou
* bpo-16379: expose SQLite error codes and error names in `sqlite3` (GH-27786)Erlend Egeberg Aasland2021-08-303-29/+153
|
* bpo-44689: ctypes.util.find_library() now finds macOS 11+ system libraries ↵Tobias Bergkvist2021-08-301-3/+26
| | | | | when built on older macOS systems (#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.
* bpo-44394: Update libexpat copy to 2.4.1 (GH-26945)Victor Stinner2021-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>
* Fix typo in a comment in Modules/_ssl.c: s/validata/validate/ (GH-27993)Adam Dangoor2021-08-271-1/+1
|
* bpo-41818: Add termios.tcgetwinsize(), termios.tcsetwinsize(). (GH-23686)Soumendra Ganguly2021-08-272-1/+223
| | | | | | | | | | | | * Add termios.tcgetwinsize(), termios.tcsetwinsize(). Update docs. * Add TIOCGSIZE support to termios.tcgetwinsize() * Add TIOCSSIZE support to termios.tcsetwinsize() Authored-by: Soumendra Ganguly <soumendraganguly@gmail.com> * termios.tcgetwinsize() and termios.tcsetwinsize() should return/accept two-item tuples instead of lists. * Refactor tcsetwinsize to share common code and accept any two item sequence, with overflow checking. Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
* bpo-27334: Fix reference leak introduced by GH-26202 (GH-27942)Erlend Egeberg Aasland2021-08-251-0/+1
|
* bpo-27334: roll back transaction if sqlite3 context manager fails to commit ↵Erlend Egeberg Aasland2021-08-251-7/+21
| | | | | | (GH-26202) Co-authored-by: Luca Citi Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
* bpo-44976: Lazy creation of sqlite3 result rows (GH-27884)Erlend Egeberg Aasland2021-08-252-58/+29
|
* Add tests for the C tokenizer and expose it as a private module (GH-27924)Pablo Galindo Salgado2021-08-241-0/+4
|
* bpo-42064: Pass module state to `sqlite3` UDF callbacks (GH-27456)Erlend Egeberg Aasland2021-08-242-31/+64
| | | | - Establish common callback context struct - Convert UDF callbacks to fetch module state from callback context
* bpo-44984: Rewrite test_null_strings in _testcapi (GH-27904)Serhiy Storchaka2021-08-231-8/+16
| | | Test also PyObject_Repr(NULL) and PyObject_Bytes(NULL).
* Remove unused UNKNOWN macros from cursor.h and prepare_protocol.h (GH-27885)Erlend Egeberg Aasland2021-08-222-2/+0
|
* bpo-44965: Early exit for non-DML statements in sqlite3.Cursor.executemany() ↵Erlend Egeberg Aasland2021-08-211-8/+7
| | | | (GH-27865)
* bpo-44079: Strip superfluous statement cache from sqlite3.Connection (GH-25998)Erlend Egeberg Aasland2021-08-184-116/+18
|
* 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]