summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/cursor.c
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] gh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE ↵Erlend Egeberg Aasland2022-06-081-9/+14
| | | | | (GH-93526) (GH-93599) (cherry picked from commit 875de61)
* [3.10] gh-80254: Disallow recursive usage of cursors in `sqlite3` converters ↵Erlend Egeberg Aasland2022-05-051-14/+32
| | | | | | | | | | | | (#92274) * [3.10] gh-80254: Disallow recursive usage of cursors in `sqlite3` converters (#29054) (cherry picked from commit f629dcfe835e349433e4c5099381d668e8fe69c8) Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> * Fix ref leak in pysqlite_cursor_iternext
* [3.10] sqlite3: normalise pre-acronym determiners (GH-31772) (GH-31806)Jelle Zijlstra2022-03-121-4/+4
| | | | | | | For consistency, replace "a SQL" with "an SQL".. (cherry picked from commit 2d5835a019a46573d5b1b614c8ef88d6b564d8d4) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* [3.10] Docstring: replace pysqlite with sqlite3 (GH-31758) (GH-31777)Jelle Zijlstra2022-03-091-4/+4
| | | | | | | Replace two instances of "pysqlite" with "sqlite3" in sqlite3 docstrings. Also reword "is a no-op" to "does nothing" for clarity.. (cherry picked from commit b33a1ae703338e09dc0af5fbfd8ffa01d3ff75da) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* [3.10] bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612) ↵Erlend Egeberg Aasland2022-03-081-2/+2
| | | | | (GH-31753) (cherry picked from commit 4d95fa1ac5d31ff450fb2f31b55ce1eb99d6efcb)
* [3.10] Fix docstring typo in ↵Erlend Egeberg Aasland2021-07-141-2/+2
| | | | | | | | 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-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) ↵Miss Islington (bot)2021-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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>
* [3.10] bpo-42972: Track sqlite3 statement objects (GH-26475) (GH-26515)Erlend Egeberg Aasland2021-06-031-7/+2
| | | | | | | | | | | | | | 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-42972: Fix sqlite3 traverse/clear functions (GH-26452) (GH-26461)Miss Islington (bot)2021-05-311-14/+15
| | | | | (cherry picked from commit d1124b09e8251061dc040cbd396f35ae57783f4a) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-42972: Fully implement GC protocol for sqlite3 heap types (GH-26104)Miss Islington (bot)2021-05-251-13/+33
| | | | | (cherry picked from commit d3c277a59c3d93fb92f7026f63678083d1d49fc5) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-43852: Improve tuple creation in sqlite3 (GH-25421)Erlend Egeberg Aasland2021-04-231-16/+9
|
* bpo-43752: Fix sqlite3 regression for zero-sized blobs with converters ↵Erlend Egeberg Aasland2021-04-141-11/+14
| | | | (GH-25228)
* bpo-43369: sqlite3_column_{text,blob} failures now raise MemoryError (GH-24723)Erlend Egeberg Aasland2021-03-041-10/+23
|
* bpo-43368: Fix fetching empty bytes in sqlite3 (GH-24706)Mariusz Felisiak2021-03-031-6/+2
| | | Regression introduced in 47feb1feb28631b6647699b7633109aa85340966.
* bpo-39523: Use do-while loop pysqlite_cursor_executescript() (GH-18305)Alex Henrie2021-03-021-3/+2
|
* bpo-43251: sqlite3_column_name() failures now raise MemoryError (GH-24609)Erlend Egeberg Aasland2021-02-281-24/+29
|
* bpo-43269: Remove redundant extern keywords (GH-24605)Erlend Egeberg Aasland2021-02-211-1/+2
|
* bpo-43269: Clean up sqlite3 file scope (GH-24578)Erlend Egeberg Aasland2021-02-211-3/+2
|
* bpo-43249: Improve scoping in _pysqlite_fetch_one_row() (GH-24565)Erlend Egeberg Aasland2021-02-181-10/+9
|
* bpo-43249: sqlite3_column_bytes() must follow sqlite_column_blob() (GH-24562)Erlend Egeberg Aasland2021-02-181-4/+14
|
* bpo-43083: Fix error handling in _sqlite3 (GH-24395)Serhiy Storchaka2021-01-311-6/+14
|
* bpo-40956: Fix sqlite3.Cursor.fetchmany() default value (GH-24214)Erlend Egeberg Aasland2021-01-131-2/+3
|
* bpo-40956: Convert _sqlite3.Cursor to Argument Clinic (GH-24007)Erlend Egeberg Aasland2021-01-051-61/+137
|
* bpo-1635741: sqlite3 uses Py_NewRef/Py_XNewRef (GH-23170)Erlend Egeberg Aasland2020-12-271-18/+12
|
* bpo-40956: Convert _sqlite3.Connection to Argument Clinic, part 2 (GH-23838)Erlend Egeberg Aasland2020-12-271-1/+2
|
* bpo-41861: Convert _sqlite3 CursorType and ConnectionType to heap types ↵Erlend Egeberg Aasland2020-10-011-45/+31
| | | | (GH-22478)
* bpo-41861: Convert _sqlite3 RowType and StatementType to heap types (GH-22444)Erlend Egeberg Aasland2020-10-011-1/+1
|
* bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. ↵Serhiy Storchaka2020-03-211-7/+22
| | | | (GH-18942)
* bpo-39245: Switch to public API for Vectorcall (GH-18460)Petr Viktorin2020-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bulk of this patch was generated automatically with: for name in \ PyObject_Vectorcall \ Py_TPFLAGS_HAVE_VECTORCALL \ PyObject_VectorcallMethod \ PyVectorcall_Function \ PyObject_CallOneArg \ PyObject_CallMethodNoArgs \ PyObject_CallMethodOneArg \ ; do echo $name git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g" done old=_PyObject_FastCallDict new=PyObject_VectorcallDict git grep -lwz $old | xargs -0 sed -i "s/\b$old\b/$new/g" and then cleaned up: - Revert changes to in docs & news - Revert changes to backcompat defines in headers - Nudge misaligned comments
* bpo-39496: Remove redundant checks from _sqlite/cursor.c (GH-18270)Alex Henrie2020-02-011-20/+6
|
* bpo-39497: Remove unused variable from pysqlite_cursor_executescript (GH-18271)Alex Henrie2020-01-301-3/+0
|
* bpo-39494: Remove extra null terminators from kwlist vars (GH-18267)Alex Henrie2020-01-301-1/+1
|
* Replace _pysqlite_long_from_int64() with PyLong_FromLongLong() (GH-16882)Sergey Fedoseev2019-10-231-2/+2
|
* bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)Jeroen Demeyer2019-07-081-1/+1
|
* bpo-37483: add _PyObject_CallOneArg() function (#14558)Jeroen Demeyer2019-07-041-1/+1
|
* bpo-37406: sqlite3 raises TypeError for wrong operation type (GH-14386)Victor Stinner2019-06-261-12/+2
| | | | | The sqlite3 module now raises TypeError, rather than ValueError, if operation argument type is not str: execute(), executemany() and calling a connection.
* bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async ↵Jeroen Demeyer2019-05-311-2/+2
| | | | | | | | | (GH-13464) Automatically replace tp_print -> tp_vectorcall_offset tp_compare -> tp_as_async tp_reserved -> tp_as_async
* bpo-32788: Better error handling in sqlite3. (GH-3723)Serhiy Storchaka2018-12-101-72/+53
| | | Propagate unexpected errors (like MemoryError and KeyboardInterrupt) to user.
* bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)Serhiy Storchaka2018-11-271-1/+1
| | | | | | Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS excluding Argument Clinic generated code.
* Remove creation of a list for row_cast_map in pysqlite_cursor_init() (GH-8494)Sergey Fedoseev2018-07-301-5/+2
| | | | | This list is never used: if detect_types is on, this list will be replaced with another one before row_cast_map is used, if detect_types is off, row_cast_map is not used at all.
* Remove some unused code in _pysqlite_query_execute() (GH-8495)Sergey Fedoseev2018-07-271-6/+0
| | | Unused since commit ab994ed8b97e1b0dac151ec827c857f5e7277565.
* prefix internal sqlite symbols with _pysqlite_ (GH-8215)Benjamin Peterson2018-07-101-2/+2
|
* bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor ↵Oren Milman2017-11-071-0/+5
| | | | object is uninitialized (#3958)
* bpo-31770: Prevent a crash and refleaks when calling ↵Oren Milman2017-11-071-8/+7
| | | | sqlite3.Cursor.__init__() more than once (#3968)
* closes bpo-31525: require sqlite3_prepare_v2 (#3666)Benjamin Peterson2017-09-201-63/+34
| | | | | This is based on https://github.com/ghaering/pysqlite/commit/40b349cadbd87c42f70fc92e5e1aee6d02564c6d#diff-0489411409cd2934730e88bf7767790, though we can be a bit more aggressive about deleting code.
* bpo-9303: Migrate sqlite3 module to _v2 API to enhance performance (#359)Aviv Palivoda2017-03-031-1/+3
|
* bpo-28518: Start a transaction implicitly before a DML statement (#245)Berker Peksag2017-02-261-5/+4
| | | Patch by Aviv Palivoda.
* Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSizeSerhiy Storchaka2016-11-201-2/+2
| | | | with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
* Issue #28037: Use sqlite3_get_autocommit() instead of setting ↵Berker Peksag2016-09-121-9/+0
| | | | | | Connection->inTransaction manually Patch adapted from https://github.com/ghaering/pysqlite/commit/9b79188edbc50faa24dc178afe24a10454f3fcad
* Issue #10740: sqlite3 no longer implicitly commit an open transaction before ↵Berker Peksag2016-09-111-99/+26
| | | | | | | | | | | | | | | | | | DDL statements This commit contains the following commits from ghaering/pysqlite: * https://github.com/ghaering/pysqlite/commit/f254c534948c41c0ceb8cbabf0d4a2f547754739 * https://github.com/ghaering/pysqlite/commit/796b3afe38cfdac5d7d5ec260826b0a596554631 * https://github.com/ghaering/pysqlite/commit/cae87ee68613697a5f4947b4a0941f59a28da1b6 * https://github.com/ghaering/pysqlite/commit/3567b31bb5e5b226ba006213a9c69dde3f155faf With the following additions: * Fixed a refcount error * Fixed a compiler warning * Made the string comparison a little more robust * Added a whatsnew entry