summaryrefslogtreecommitdiffstats
path: root/Lib/os.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-08-08 05:49:44 (GMT)
committerGitHub <noreply@github.com>2021-08-08 05:49:44 (GMT)
commit0eec6276fdcdde5221370d92b50ea95851760c72 (patch)
tree35fa0e56f83f404eb2120ec1963c6b5e15813d34 /Lib/os.py
parentebecffdb6d5fffa4249f9a813f1fc1915926feb5 (diff)
downloadcpython-0eec6276fdcdde5221370d92b50ea95851760c72.zip
cpython-0eec6276fdcdde5221370d92b50ea95851760c72.tar.gz
cpython-0eec6276fdcdde5221370d92b50ea95851760c72.tar.bz2
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>
Diffstat (limited to 'Lib/os.py')
0 files changed, 0 insertions, 0 deletions