summaryrefslogtreecommitdiff
path: root/Lib/sqlite3
AgeCommit message (Collapse)AuthorLines
2022-05-16[3.8] gh-80254: Disallow recursive usage of cursors in sqlite3 converters ↵Erlend Egeberg Aasland-0/+43
(#92333) (cherry picked from commit c908dc5b4798c311981bd7e1f7d92fb623ee448b) Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-01-04bpo-40810: Fix CheckTraceCallbackContent for SQLite pre 3.7.15 (GH-20530)Miss Islington (bot)-0/+8
Ref. [SQLite 3.7.15 changelog](https://sqlite.org/changes.htmlGH-version_3_7_15): _"Avoid invoking the sqlite3_trace() callback multiple times when a statement is automatically reprepared due to SQLITE_SCHEMA errors."_ (cherry picked from commit f7f0ed59bcc41ed20674d4b2aa443d3b79e725f4) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2020-10-26bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)Miss Skeleton (bot)-1/+26
* When the parameters argument is a list, correctly handle the case of changing it during iteration. * When the parameters argument is a custom sequence, no longer override an exception raised in ``__len__()``. (cherry picked from commit 0b419b791077414bbc011a412698ebb362b63761) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2020-09-21bpo-41815: SQLite: segfault if backup called on closed database (GH-22322)Miss Islington (bot)-0/+7
GH- [bpo-41815](): SQLite: fix segfault if backup called on closed database Attempting to backup a closed database will trigger segfault: ```python import sqlite3 target = sqlite3.connect(':memory:') source = sqlite3.connect(':memory:') source.close() source.backup(target) ``` (cherry picked from commit bfee9fad84531a471fd7864e88947320669f68e2) Co-authored-by: Peter McCormick <peter@pdmccormick.com>
2020-05-29bpo-40784: Fix sqlite3 deterministic test (GH-20448)Miss Islington (bot)-8/+26
(cherry picked from commit c610d970f5373b143bf5f5900d4645e6a90fb460) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2020-03-21bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. ↵Miss Islington (bot)-4/+4
(GH-18942) (cherry picked from commit b146568dfcbcd7409c724f8917e4f77433dd56e4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-09-16bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. ↵Miss Islington (bot)-7/+18
(GH-16190) (cherry picked from commit f669581a9527afb0d2325f9845a86715c0ba365d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-09-16bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155)Miss Islington (bot)-7/+21
(cherry picked from commit 8debfa50407107ff2329d01081cdc12d359f1d12) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-07-12closes bpo-37347: Fix refcount problem in sqlite3. (GH-14268)Miss Islington (bot)-58/+13
(cherry picked from commit b9a0376b0dedf16a2f82fa43d851119d1f7a2707) Co-authored-by: gescheit <gescheit@yandex-team.ru>
2018-12-17bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. ↵Zackery Spytz-0/+4
(GH-11175)
2018-12-10bpo-32788: Better error handling in sqlite3. (GH-3723)Serhiy Storchaka-3/+25
Propagate unexpected errors (like MemoryError and KeyboardInterrupt) to user.
2018-12-05bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. ↵Sergey Fedoseev-19/+64
(GH-8113)
2018-07-08bpo-34041: Allow creating deterministic functions in ↵Sergey Fedoseev-0/+23
Connection.create_function() (GH-8086)
2018-04-20Spelling fixes to docs, docstrings, and comments (GH-6374)Ville Skyttä-1/+1
2018-03-18bpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)Aviv Palivoda-3/+1
It was actually fixed in SQLite 3.8.8, not 3.8.7.
2018-03-11bpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)Berker Peksag-0/+2
2018-03-11bpo-27645: Add support for native backup facility of SQLite (GH-4238)Emanuele Gaifas-0/+162
2017-11-08Remove unused var from CheckCancelOperation test (GH-4317)Simon Willison-2/+0
It looks like this was copied from one of the previous tests, which did use it.
2017-11-06bpo-31843: sqlite3.connect() now accepts PathLike objects as database name ↵Anders Lorentsen-0/+11
(#4299)
2017-11-06bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor ↵Oren Milman-0/+3
object is uninitialized (#3958)
2017-11-06bpo-31770: Prevent a crash and refleaks when calling ↵Oren Milman-0/+18
sqlite3.Cursor.__init__() more than once (#3968)
2017-09-07bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou-5/+1
* Remove Setup.config * Always define WITH_THREAD for compatibility.
2017-04-09bpo-26187: Test that set_trace_callback() is not called multiple times (GH-461)Aviv Palivoda-0/+20
conn.set_trace_callback() shouldn't be called multiple times when the schema is changing. This has indirectly been fixed by using sqlite3_prepare_v2() in bpo-9303.
2017-02-26bpo-28518: Start a transaction implicitly before a DML statement (#245)Berker Peksag-0/+9
Patch by Aviv Palivoda.
2016-12-31Issue #29123: Merge from 3.5Berker Peksag-2/+1
2016-12-31Issue #29123: Make CheckSqlTimestamp more robustBerker Peksag-2/+1
2016-09-27Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()Serhiy Storchaka-0/+22
if pass invalid string-like object as a name. Patch by Xiang Zhang.
2016-09-27Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()Serhiy Storchaka-0/+22
if pass invalid string-like object as a name. Patch by Xiang Zhang.
2016-09-11Issue #10740: sqlite3 no longer implicitly commit an open transaction before ↵Berker Peksag-8/+28
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
2016-09-07Issue #21250: Add tests for SQLite's ON CONFLICT clauseBerker Peksag-1/+100
Initial patch by Alex LordThorsen.
2016-09-01Issue #27881: Fixed possible bugs when setting ↵Serhiy Storchaka-4/+27
sqlite3.Connection.isolation_level. Based on patch by Xiang Zhang.
2016-09-07Issue #21250: Merge from 3.5Berker Peksag-1/+100
2016-09-01Issue #27881: Fixed possible bugs when setting ↵Serhiy Storchaka-4/+27
sqlite3.Connection.isolation_level. Based on patch by Xiang Zhang.
2016-08-29Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factorySerhiy Storchaka-3/+17
creates not a cursor. Patch by Xiang Zhang.
2016-08-29Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factorySerhiy Storchaka-3/+17
creates not a cursor. Patch by Xiang Zhang.
2016-08-26Issue #10513: Merge from 3.5Berker Peksag-0/+31
2016-08-26Issue #10513: Fix a regression in Connection.commit()Berker Peksag-0/+31
Statements should not be reset after a commit. Backported from https://github.com/ghaering/pysqlite/commit/029050896b1e6058573abeef5a8970384c0c7faa
2016-08-21Issue #21718: Merge from 3.5Berker Peksag-1/+41
2016-08-21Issue #21718: cursor.description is now available for queries using CTEsBerker Peksag-1/+41
According to PEP 249, cursor.description must be available for any SELECT statements, such as those that use CTEs. Backported from https://github.com/ghaering/pysqlite/commit/f67fa9c898a4713850e16934046f0fe2cba8c44c Additional test cases added by me.
2016-06-14Issue #16864: Cursor.lastrowid now supports REPLACE statementBerker Peksag-1/+42
Initial patch by Alex LordThorsen.
2016-06-14Mark tests as skipped when a SQLite version is not supportedBerker Peksag-16/+9
2016-06-14Remove empty setUp and tearDown methods from sqlite3 testsBerker Peksag-18/+0
They are not used as base classes by another tests so they can safely be removed.
2016-06-14Replace more boilerplate code with modern unittest features in sqlite3 testsBerker Peksag-13/+6
2016-06-12Modernize sqlite3 testsBerker Peksag-257/+62
Update current tests that use old pattern with assertRaises to make them more maintainable.
2016-06-12Issue #27190: Raise NotSupportedError if sqlite3 is older than 3.3.1Berker Peksag-0/+6
Patch by Dave Sawyer.
2016-06-12Issue #27188: Fix various sqlite3 documentation errorsBerker Peksag-0/+12
* Connection.execute* methods don't create intermediate cursor objects * Fix description of seq_of_parameters parameter * Clarify that Warning is sqlite3.Warning * sql_script parameter of Cursor.executescript() doesn't accept bytes * Add missing tests * Fix various markup errors Initial patch by Dave Sawyer.
2016-04-17Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka-1/+1
2016-03-27Issue #23758: Improve num_params docs of create_{function,aggregate} functionsBerker Peksag-0/+31
If you pass -1, the callable can take any number of arguments. Added tests to verify the behavior. Initial patch by Cédric Krier.
2015-05-22Issue #24257: Fixed incorrect uses of PyObject_IsInstance().Serhiy Storchaka-0/+8
Fixed segmentation fault in sqlite3.Row constructor with faked cursor type. Fixed system error in the comparison of faked types.SimpleNamespace.
2015-05-22Issue #24257: Fixed incorrect uses of PyObject_IsInstance().Serhiy Storchaka-0/+8
Fixed segmentation fault in sqlite3.Row constructor with faked cursor type. Fixed system error in the comparison of faked types.SimpleNamespace.