cpython/Lib/sqlite3
Serhiy Storchaka 0eec6276fd
bpo-44859: Improve error handling in sqlite3 and and raise more accurate exceptions. (GH-27654)
* MemoryError is now raised instead of sqlite3.Warning when
  memory is not enough for encoding a statement to UTF-8
  in Connection.__call__() and Cursor.execute().
* UnicodEncodeError is now raised instead of sqlite3.Warning when
  the statement contains surrogate characters
  in Connection.__call__() and Cursor.execute().
* TypeError is now raised instead of ValueError for non-string
  script argument in Cursor.executescript().
* ValueError is now raised for script containing the null
  character instead of truncating it in Cursor.executescript().
* Correctly handle exceptions raised when getting boolean value
  of the result of the progress handler.
* Add many tests covering different corner cases.

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-08-08 08:49:44 +03:00
..
test bpo-44859: Improve error handling in sqlite3 and and raise more accurate exceptions. (GH-27654) 2021-08-08 08:49:44 +03:00
__init__.py bpo-42264: Deprecate sqlite3.OptimizedUnicode (GH-23163) 2020-11-17 17:55:12 +02:00
dbapi2.py bpo-24464: Fix sqlite3.enable_shared_cache() deprecation wrapper (GH-24170) 2021-01-09 13:25:55 +02:00
dump.py #15545: fix sqlite3.iterdump regression on unsortable row_factory objects. 2013-01-10 11:04:09 -05:00