-
- Downloads
gh-89022: Improve sqlite3 exceptions related to binding params and API 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.
Showing
- Lib/test/test_sqlite3/test_dbapi.py 1 addition, 1 deletionLib/test/test_sqlite3/test_dbapi.py
- Lib/test/test_sqlite3/test_types.py 4 additions, 4 deletionsLib/test/test_sqlite3/test_types.py
- Misc/NEWS.d/next/Library/2022-04-15-17-06-09.gh-issue-89022.DgdQCa.rst 4 additions, 0 deletions...ext/Library/2022-04-15-17-06-09.gh-issue-89022.DgdQCa.rst
- Modules/_sqlite/cursor.c 19 additions, 14 deletionsModules/_sqlite/cursor.c
- Modules/_sqlite/util.c 0 additions, 1 deletionModules/_sqlite/util.c
Loading
Please register or sign in to comment