Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-44859: Raise more accurate exceptions in sqlite3#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 our terms of service and privacy 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
erlend-aasland commented Aug 9, 2021 • 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.
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.
608f9fe to f9a5dc6Compareerlend-aasland commented Sep 10, 2021
@serhiy-storchaka would you mind reviewing this? |
Failure to do so, will result in an assertion failure / segfault.
erlend-aasland commented Sep 20, 2021
@serhiy-storchaka PTAL. I just fixed bug in |
erlend-aasland commented Oct 27, 2021
@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 Outdated Show 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 Outdated Show 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.
JelleZijlstra commented Feb 17, 2022
Looks like you didn't push the changes I previously asked for. |
erlend-aasland commented Feb 17, 2022
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! |
erlend-aasland commented Feb 26, 2022
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 commented Mar 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 because b899126 produces a ton of warnings in the Django test suite. I reverted b899126 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.
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