Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
bpo-44859: Raise more accurate exceptions insqlite3#27695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
If SQLITE_MISUSE is raised, it is a sqlite3 module bug. Users of thesqlite3 module are not responsible of using the SQLite C API correctly.
@serhiy-storchaka would you mind reviewing this? |
Failure to do so, will result in an assertion failure / segfault.
@serhiy-storchaka PTAL. I just fixed bug in |
@malemburg would you mind taking a look at this PR? I'm slowly trying to align the exceptions raised with PEP 249. |
Misc/NEWS.d/next/Library/2021-08-10-00-05-53.bpo-44859.9e9_3V.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Misc/NEWS.d/next/Library/2021-08-10-00-05-53.bpo-44859.9e9_3V.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Looks like you didn't push the changes I previously asked for. |
Actually, it seems I forgot about this; I didn't make any changes yet :) I'll see if I can get to it any time soon. Thanks for the reminder! |
I'd like to run this through the Django test suite before eventually merging. Also, I'll have a talk with MAL regarding this change. |
erlend-aasland commentedMar 2, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I finally got to run this through the Django test suite, and it works all fine; one down, one to go. Observations while running the Django test suiteI got sidetracked with a long bisect operation because I was using SQLite 3.39.0 (development version), and becauseb899126 produces a ton of warnings in the Django test suite. I revertedb899126 and compiled strictly against SQLite 3.36.0 (macOS bundled), and all was ok. UPDATE: I had a chat the other day with@malemburg, to get his comments regarding three specific DB-API related changes in this PR. I take the liberty to quote him here (hope that's ok, Marc-Andre):
I will update the PR with the suggested change. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Improve exception compliancy with PEP 249
If SQLITE_MISUSE is raised, it is a sqlite3 module bug. Users of the
sqlite3 module are not responsible of using the SQLite C API correctly.
than one SQL statement.
_pysqlite_set_resultraises an exception if it returns -1.Fixes#89022