summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-44389: Remove duplicate SSL_OP_NO_TLSv1_2 flag (GH-26680)Erlend Egeberg Aasland2021-06-121-1/+1
|
* Add more const modifiers. (GH-26691)Serhiy Storchaka2021-06-121-2/+2
|
* bpo-44339: Fix math.pow corner case to comply with IEEE 754 (GH-26606)Mark Dickinson2021-06-121-2/+0
| | | Change the behaviour of `math.pow(0.0, -math.inf)` and `math.pow(-0.0, -math.inf)` to return positive infinity instead of raising `ValueError`. This makes `math.pow` consistent with the built-in `pow` (and the `**` operator) for this particular special case, and brings the `math.pow` special-case handling into compliance with IEEE 754.
* bpo-44362: ssl: improve deprecation warnings and docs (GH-26646)Christian Heimes2021-06-111-14/+28
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-44357:Add `math.cbrt()` function: Cube Root (GH-26622)Ajith Ramachandran2021-06-101-0/+4
| | | | | | * Add math.cbrt() function: Cube Root Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* bpo-44363: Get test_capi passing with address sanitizer (GH-26639)Mark Shannon2021-06-101-0/+5
|
* bpo-44329: Refactor sqlite3 statement creation (GH-26566)Erlend Egeberg Aasland2021-06-081-43/+35
| | | | | Call SQLite API's first, and return early in case of error. At the end, allocate the object and initialise members. We now avoid unneeded alloc/dealloc's in case the statement creation fails.
* Fix compiler errors for unused variables (GH-26601)Pablo Galindo2021-06-081-1/+1
|
* bpo-44348: Revert "bpo-39573: Py_TYPE becomes a static inline function ↵Pablo Galindo2021-06-081-3/+4
| | | | | | (GH-26493)" (GH-26596) This reverts commit f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 as is causing crashes in some Windows tests in the buildbots.
* bpo-44326: Remove unused members from pysqlite_Statement (GH-26564)Erlend Egeberg Aasland2021-06-062-16/+2
| | | | | * Remove unused db member of pysqlite_Statement * Remove unused sql method from statement object
* bpo-44327: Remove unused members from pysqlite_Connection (GH-26565)Erlend Egeberg Aasland2021-06-062-8/+0
| | | | | * Remove timeout_started * Remove timeout member
* Update bisect docstrings (GH-26548)hrchu2021-06-062-11/+11
|
* bpo-44304: Ensure the sqlite3 destructor callback is always called with the ↵Pablo Galindo2021-06-052-0/+7
| | | | GIL held (GH-26551)
* bpo-44304: Fix crash in the sqlite3 module when the GC clears Statement ↵Pablo Galindo2021-06-051-7/+4
| | | | objects (GH-26545)
* Align comment for better readability. (GH-26192)Kazantcev Andrey2021-06-041-5/+5
|
* bpo-44315: Remove unused connection argument from pysqlite_step() (GH-26535)Erlend Egeberg Aasland2021-06-044-7/+8
|
* bpo-43853: Handle sqlite3_value_text() errors (GH-25422)Erlend Egeberg Aasland2021-06-041-8/+11
|
* bpo-44042: Optimize sqlite3 begin transaction (GH-25908)Erlend Egeberg Aasland2021-06-033-46/+38
|
* bpo-42862: Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module ↵Erlend Egeberg Aasland2021-06-037-428/+71
| | | | | (GH-24203) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39573: Py_TYPE becomes a static inline function (GH-26493)Victor Stinner2021-06-031-4/+3
| | | | | Convert the Py_TYPE() and Py_SIZE() macros to static inline functions. The Py_SET_TYPE() and Py_SET_SIZE() functions must now be used to set an object type and size.
* bpo-42213: Remove redundant cyclic GC hack in sqlite3 (GH-26517)Erlend Egeberg Aasland2021-06-033-21/+2
| | | | | | | | | | The sqlite3 module now fully implements the GC protocol, so there's no need for this workaround anymore. - Add and use managed resource helper for connections using TESTFN - Sort test imports - Split open-tests into their own test case Automerge-Triggered-By: GH:vstinner
* bpo-42213: Check connection in sqlite3.Connection.__enter__ (GH-26512)Erlend Egeberg Aasland2021-06-031-16/+15
| | | | | | | | | Try to harden connection close: - add tests that exercise stuff against a closed database - add wrapper for sqlite3_close_v2() - check connection on __enter__ - explicitly free pending statements before close() - sqlite3_close_v2() always returns SQLITE_OK
* bpo-44285: getpath.c: Assert that env_file is NULL during an error check ↵stratakis2021-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.
* bpo-44165: pysqlite_statement_create now returns a Py object, not an int ↵Erlend Egeberg Aasland2021-06-021-1/+1
| | | | | (GH-26484) GH-26206 was broken by GH-26475.
* bpo-44165: Optimise sqlite3 statement preparation by passing string size ↵Erlend Egeberg Aasland2021-06-023-7/+25
| | | | (GH-26206)
* bpo-42972: Track sqlite3 statement objects (GH-26475)Erlend Egeberg Aasland2021-06-014-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>
* bpo-44260: Do not read system entropy without need in Random() (GH-26455)Serhiy Storchaka2021-05-311-27/+17
|
* bpo-44263: Fix _decimal and _testcapi GC protocol (GH-26464)Victor Stinner2021-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.
* bpo-42972: Fix sqlite3 traverse/clear functions (GH-26452)Erlend Egeberg Aasland2021-05-316-41/+44
|
* bpo-42972: Fully implement GC protocol for xxlimited (GH-26451)Hai Shi2021-05-312-0/+16
|
* bpo-44252: Correctly implement gc support for SSLError objects (GH-26439)Pablo Galindo2021-05-281-2/+1
|
* bpo-42972: Fix GC assertion error in _winapi by untracking Overlapped ↵Ken Jin2021-05-281-1/+1
| | | | earlier (GH(26429)
* bpo-42972: Fully support GC for _winapi.Overlapped (GH-26381)Ken Jin2021-05-281-2/+46
|
* bpo-42972: Fully implement GC protocol for functools LRU cache (GH-26423)Erlend Egeberg Aasland2021-05-281-2/+4
|
* bpo-42972: Fully implement GC protocol for functools keywrapper and partial ↵Erlend Egeberg Aasland2021-05-281-22/+37
| | | | types (GH-26363)
* bpo-44256: Do not expose _functools._list_elem_type (GH-26416)Inada Naoki2021-05-281-3/+2
| | | It is internal use only type.
* bpo-42972: Fully support GC protocol for _operator heap types (GH-26371)Erlend Egeberg Aasland2021-05-271-5/+33
|
* bpo-42972: Fully implement GC protocol for re types (GH-26368)Erlend Egeberg Aasland2021-05-271-19/+81
|
* bpo-42972: Fully support GC for mmap heap types (GH-26373)Erlend Egeberg Aasland2021-05-271-3/+10
|
* bpo-42972: Fully support GC protocol for _queue.SimpleQueue (GH-26372)Erlend Egeberg Aasland2021-05-271-1/+10
|
* bpo-42972: Fully implement GC protocol for ssl heap types (GH-26370)Erlend Egeberg Aasland2021-05-271-28/+45
|
* bpo-42972: Fully support GC for hashlib heap types (GH-26374)Erlend Egeberg Aasland2021-05-274-16/+69
|
* bpo-42972: Fully support GC for pyexpat, unicodedata, and dbm/gdbm heap ↵Erlend Egeberg Aasland2021-05-275-35/+69
| | | | | | | types (GH-26376) * bpo-42972: pyexpat * bpo-42972: unicodedata * bpo-42972: dbm/gdbm
* bpo-42161: mathmodule.c: move _PyLong_GetOne() loop invariant (GH-26391)Victor Stinner2021-05-261-8/+12
| | | | | | | | | Move _PyLong_GetZero() and _PyLong_GetOne() loop invariants outside loops in functions: * math.comb() * math.gcd() * math.lcm() * math.perm()
* bpo-43879: Add native_thread_id field to PyThreadState (GH-25458)Gabriele N. Tornetta2021-05-261-0/+5
|
* bpo-42972: Fully implement GC protocol for arraymodule types (GH-26114)Erlend Egeberg Aasland2021-05-251-2/+11
|
* bpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104)Erlend Egeberg Aasland2021-05-256-72/+190
|
* bpo-40736: Improve the error message for re.search() TypeError (GH-23312)Zackery Spytz2021-05-211-1/+2
| | | Include the invalid type in the error message.
* Fix compiler warning for misleading guarding in the tkinter (GH-26244)Pablo Galindo2021-05-191-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | The newest gcc emmits this warning: ``` /Modules/_tkinter.c:272:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 272 | if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; } | ^~ /Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’ 2869 | LEAVE_PYTHON | ^~~~~~~~~~~~ /Modules/_tkinter.c:243:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 243 | (*(PyThreadState**)Tcl_GetThreadData(&state_key, sizeof(PyThreadState*))) | ^ /Modules/_tkinter.c:272:57: note: in expansion of macro ‘tcl_tstate’ 272 | if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; } | ^~~~~~~~~~ /Modules/_tkinter.c:2869:5: note: in expansion of macro ‘LEAVE_PYTHON’ 2869 | LEAVE_PYTHON ``` that's because the macro packs together two statements at the same level as the "if". The warning is misleading but is very noisy so it makes sense to fix it.
* Fix compiler warning in the xml module (GH-26245)Pablo Galindo2021-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The newest version of gcc complains about passing un-initialized arrays as constant pointers: ``` /Modules/expat/xmltok_ns.c: In function ‘findEncodingNS’: /Modules/expat/xmltok.h:272:10: warning: ‘buf’ may be used uninitialized [-Wmaybe-uninitialized] 272 | (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim)) | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’ 95 | XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1); | ^~~~~~~~~~~~~~ /Modules/expat/xmltok.h:272:10: note: by argument 5 of type ‘const char *’ to ‘enum XML_Convert_Result(const ENCODING *, const char **, const char *, char **, const char *)’ {aka ‘enum XML_Convert_Result(const struct encoding *, const char **, const char *, char **, const char *)’} 272 | (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim)) | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Modules/expat/xmltok_ns.c:95:3: note: in expansion of macro ‘XmlUtf8Convert’ 95 | XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1); | ^~~~~~~~~~~~~~ In file included from /Modules/expat/xmltok.c:1657: /Modules/expat/xmltok_ns.c:92:8: note: ‘buf’ declared here 92 | char buf[ENCODING_MAX]; ```