| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
test_sqlite3.test_transactions now completes ~10 times faster than before.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
| |
32-bit builds (#103902) (#104285)
|
|
|
|
|
|
| |
The size of the returned data is too implementation specific.
(cherry picked from commit 61405da9a5689f554aa53929a2a9c168cab6056b)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
| |
(cherry picked from commit 15bfabd1aabb0335f33202b28f96b4e4062b3bce)
Co-authored-by: Christian Heimes <christian@python.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 46740073ef32bf83964c39609c7a7a4772c51ce3)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
| |
(cherry picked from commit 875de61c296604f3a3a51e9d76355e0f1a24c6af)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
|
|
|
|
|
| |
(cherry picked from commit d5f0dd160011826f0196d220aefc29d2ce497428)
Co-authored-by: Florian Bruhin <me@the-compiler.org>
|
|
|
|
|
|
|
| |
Remove helper managed_connect(). Use memory_database() or
contextlib.closing() + addCleanup(unlink) instead.
(cherry picked from commit e5d8dbdd304935dbd0631ee9605efb501332f792)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
| |
* Test with with escaped non-ascii characters
* Test read-only open of existing DB.
(cherry picked from commit 4e2b66489289cfd4db2a02edf173ac03cbb2fffe)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
sqlite3.connect() to bytes (GH-93046) (GH-93048)
Just pass it to the factory as is.
(cherry picked from commit 14c0d33016a967a98155f2e1615660e9328aef5d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit d8537580921b2e02f477ff1a8dedcf82c24ef0c2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
- get index now returns an int
- set index now requires an int in range(0, 256)
Resolves #92019
|
|
|
|
| |
Authored-by: Aviv Palivoda <palaviv@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
|
| |
|
| |
|
|
|
|
| |
I noticed this was missing while writing typeshed stubs. It's
useful to expose it for use in annotations and for exploration.
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
s390x RHEL buildbots (GH-29382)
|
| |
|
|
|
|
| |
(GH-28463)
|
|
Automerge-Triggered-By: GH:brettcannon
|