aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sqlite3/test_dbapi.py
Commit message (Collapse)AuthorAge
* gh-95144: Improve error message of `... in None` (GH-119888)Zachary Ware2024-07-12
|
* gh-118928: sqlite3: disallow sequences of params with named placeholders ↵Erlend E. Aasland2024-05-14
| | | | | | | | (#118929) Follow-up of gh-101693. The previous DeprecationWarning is replaced with raising sqlite3.ProgrammingError. Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-118924: Remove `sqlite3.version` and `sqlite3.version_info` (#118925)Hugo van Kemenade2024-05-10
|
* gh-118406: Add signature for sqlite3.Connection objects (#118428)Erlend E. Aasland2024-04-30
|
* gh-117995: Don't raise DeprecationWarnings for indexed nameless params (#118001)Erlend E. Aasland2024-04-22
| | | | | Filter out '?NNN' placeholders when looking for named params. Co-authored-by: AN Long <aisk@users.noreply.github.com>
* gh-116303: Skip test module dependent tests if test modules are unavailable ↵Erlend E. Aasland2024-04-03
| | | | (#117341)
* gh-114099: Add test exclusions to support running the test suite on iOS ↵Russell Keith-Magee2024-02-05
| | | | | | | | | | | | | (#114889) Add test annotations required to run the test suite on iOS (PEP 730). The majority of the change involve annotating tests that use subprocess, but are skipped on Emscripten/WASI for other reasons, and including iOS/tvOS/watchOS under the same umbrella as macOS/darwin checks. `is_apple` and `is_apple_mobile` test helpers have been added to identify *any* Apple platform, and "any Apple platform except macOS", respectively.
* gh-108550: Speed up sqlite3 tests (#108551)Erlend E. Aasland2023-08-28
| | | | | | | | | | | | | Refactor the CLI so we can easily invoke it and mock command-line arguments. Adapt the CLI tests so we no longer have to launch a separate process. Disable the busy handler for all concurrency tests; we have full control over the order of the SQLite C API calls, so we can safely do this. The sqlite3 test suite now completes ~8 times faster than before. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-105539: Fix ResourceWarning from unclosed SQLite connections in ↵Mariusz Felisiak2023-08-23
| | | | | | | | | | | | | test_sqlite3 (#108360) Follow up to 1a1bfc28912a39b500c578e9f10a8a222638d411. Explicitly manage connections in: - test_audit.test_sqlite3 - test_sqlite3.test_audit - test_sqlite3.test_backup Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-105539: Emit ResourceWarning if sqlite3 database is not closed explicitly ↵Erlend E. Aasland2023-08-22
| | | | (#108015)
* gh-105539: Explict resource management for connection objects in sqlite3 ↵Erlend E. Aasland2023-08-17
| | | | | | | | tests (#108017) - Use memory_database() helper - Move test utility functions to util.py - Add convenience memory database mixin - Add check() helper for closed connection tests
* gh-93057: Deprecate positional use of optional sqlite3.connect() params ↵Erlend E. Aasland2023-08-15
| | | | (#107948)
* gh-105875: Require SQLite 3.15.2 or newer (#105876)Erlend E. Aasland2023-06-19
| | | SQLite 3.15.2 was released 2016-11-28.
* gh-100370: fix OverflowError in sqlite3.Connection.blobopen for 32-bit ↵Erlend E. Aasland2023-05-07
| | | | builds (#103902)
* gh-103489: Add get/set config methods to sqlite3.Connection (#103506)Erlend E. Aasland2023-04-26
|
* gh-101947: Remove size check from sqlite3 serialize test (#102914)Erlend E. Aasland2023-03-22
| | | The size of the returned data is too implementation specific.
* gh-101693: In sqlite3, deprecate using named placeholders with parameters ↵Erlend E. Aasland2023-02-15
| | | | supplied as a sequence (#101698)
* gh-84461: Fix test_sqlite for Emscripten/WASI (#94125)Christian Heimes2022-06-23
|
* gh-79579: Improve DML query detection in sqlite3 (#93623)Erlend Egeberg Aasland2022-06-14
| | | | | | | | | The fix involves using pysqlite_check_remaining_sql(), not only to check for multiple statements, but now also to strip leading comments and whitespace from SQL statements, so we can improve DML query detection. pysqlite_check_remaining_sql() is renamed lstrip_sql(), to more accurately reflect its function, and hardened to handle more SQL comment corner cases.
* gh-93421: Update sqlite3 cursor.rowcount only after SQLITE_DONE (#93526)Erlend Egeberg Aasland2022-06-08
|
* gh-93370: Deprecate sqlite3.version and sqlite3.version_info (#93482)Kalyan2022-06-08
| | | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-93117: Remove too large sqlite3 bigmemtest (#93154)Erlend Egeberg Aasland2022-05-25
|
* GH-93115: Fix version check in sqlite3 module constants test (#93116)Florian Bruhin2022-05-23
|
* Clean up the sqlite3 tests (GH-93056)Serhiy Storchaka2022-05-21
| | | | Remove helper managed_connect(). Use memory_database() or contextlib.closing() + addCleanup(unlink) instead.
* Improve tests for opening Sqlite by URI (GH-93047)Serhiy Storchaka2022-05-21
| | | | * Test with with escaped non-ascii characters * Test read-only open of existing DB.
* gh-93044: No longer convert the database argument of sqlite3.connect() to ↵Serhiy Storchaka2022-05-21
| | | | | bytes (GH-93046) Just pass it to the factory as is.
* gh-91922: Fix sqlite connection on nonstardard locales and paths (GH-92926)Serhiy Storchaka2022-05-20
|
* gh-92547: Remove deprecated sqlite3 features (#92548)Erlend Egeberg Aasland2022-05-16
| | | | | | | | | | The following sqlite3 features were deprecated in 3.10, scheduled for removal in 3.12: - sqlite3.OptimizedUnicode (gh-23163) - sqlite3.enable_shared_cache (gh-24008) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Signed-off-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-89022: Improve sqlite3 exceptions related to binding params and API ↵Erlend Egeberg Aasland2022-05-04
| | | | | | | | | | | | | misuse (#91572) * Map SQLITE_MISUSE to sqlite3.InterfaceError SQLITE_MISUSE implies misuse of the SQLite C API, which, if it happens, is _not_ a user error; it is an sqlite3 extension module error. * Raise better errors when binding parameters fail. Instead of always raising InterfaceError, guessing what went wrong, raise accurate exceptions with more accurate error messages.
* gh-92019: Make sqlite3.Blob indexing conform with the norm (#92020)Erlend Egeberg Aasland2022-04-30
| | | | | | - get index now returns an int - set index now requires an int in range(0, 256) Resolves #92019
* gh-69093: Add indexing and slicing support to sqlite3.Blob (#91599)Erlend Egeberg Aasland2022-04-21
| | | | Authored-by: Aviv Palivoda <palaviv@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
* gh-69093: Add context manager support to sqlite3.Blob (GH-91562)Erlend Egeberg Aasland2022-04-15
|
* gh-69093: Don't allow instantiation of sqlite3.Blob objects (GH-91570)Erlend Egeberg Aasland2022-04-15
|
* gh-69093: Expose sqlite3.Blob as a class (GH-91550)Jelle Zijlstra2022-04-15
| | | | I noticed this was missing while writing typeshed stubs. It's useful to expose it for use in annotations and for exploration.
* gh-69093: Support basic incremental I/O to blobs in `sqlite3` (GH-30680)Erlend Egeberg Aasland2022-04-14
| | | | | | | Authored-by: Aviv Palivoda <palaviv@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no> Co-authored-by: palaviv <palaviv@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-79097: Add support for aggregate window functions in sqlite3 (GH-20903)Erlend Egeberg Aasland2022-04-11
|
* bpo-41930: Add support for SQLite serialise/deserialise API (GH-26728)Erlend Egeberg Aasland2022-04-05
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* bpo-44859: Raise more accurate exceptions in `sqlite3` (GH-27695)Erlend Egeberg Aasland2022-03-16
| | | | | | | | | | | | * Improve exception compliance with PEP 249 * Raise InterfaceError instead of ProgrammingError for SQLITE_MISUSE. If SQLITE_MISUSE is raised, it is a sqlite3 module bug. Users of the sqlite3 module are not responsible for using the SQLite C API correctly. * Don't overwrite BufferError with ValueError when conversion to BLOB fails. * Raise ProgrammingError instead of Warning if user tries to execute() more than one SQL statement. * Raise ProgrammingError instead of ValueError if an SQL query contains null characters. * Make sure `_pysqlite_set_result` raises an exception if it returns -1.
* bpo-45512: Extend `sqlite3` test suite regarding isolation levels (GH-29576)Erlend Egeberg Aasland2021-11-17
|
* bpo-45126: Harden `sqlite3` connection initialisation (GH-28227)Erlend Egeberg Aasland2021-11-16
|
* bpo-45512: Raise exception if sqlite3.Connection.__init__ is called with bad ↵Erlend Egeberg Aasland2021-11-15
| | | | | | | | | | | | | | | isolation level (#29561) * bpo-45512: Raise sqlite3.Connection.__init__ is called with bad isolation level * Also explicitly test allowed isolation levels * Use subTest for better error messages if something goes wrong * Update Lib/test/test_sqlite3/test_dbapi.py Co-authored-by: Dong-hee Na <donghee.na92@gmail.com> Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-45754: Use correct SQLite limit when checking statement length (GH-29489)Erlend Egeberg Aasland2021-11-10
|
* bpo-45243: Use connection limits to simplify `sqlite3` tests (GH-29356)Erlend Egeberg Aasland2021-11-05
|
* bpo-45613: Set `sqlite3.threadsafety` dynamically (GH-29227)Erlend Egeberg Aasland2021-11-03
| | | | | | | | | Use the compile-time selected default SQLite threaded mode to set the DB-API 2.0 attribute 'threadsafety' Mappings: - SQLITE_THREADSAFE=0 => threadsafety=0 - SQLITE_THREADSAFE=1 => threadsafety=3 - SQLITE_THREADSAFE=2 => threadsafety=1
* bpo-24139: Fix test_sqlite3 `test_extended_error_code_on_exception()` on ↵Erlend Egeberg Aasland2021-11-03
| | | | s390x RHEL buildbots (GH-29382)
* bpo-24139: Add support for SQLite extended result codes (GH-28076)Erlend Egeberg Aasland2021-11-02
|
* bpo-45243: Add support for setting/getting `sqlite3` connection limits ↵Erlend Egeberg Aasland2021-11-01
| | | | (GH-28463)
* bpo-10572: Move `sqlite3` tests to `Lib/test` (GH-29304)Erlend Egeberg Aasland2021-10-29
Automerge-Triggered-By: GH:brettcannon