-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
bpo-43853: Handle sqlite3_value_text() errors #25422
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
Conversation
@pablogsal, see top comment for a description of the changes. Relevant SQLite docs: https://sqlite.org/c3ref/value_blob.html
We call the API's in the following order:
|
Thanks @erlend-aasland for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Thanks for reviewing, Pablo! |
(cherry picked from commit 006fd86) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
GH-26534 is a backport of this pull request to the 3.10 branch. |
Thanks @erlend-aasland for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
Sorry, @erlend-aasland and @pablogsal, I could not cleanly backport this to |
I'll fix the backport. |
GH-27627 is a backport of this pull request to the 3.9 branch. |
(cherry picked from commit 006fd86) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
MemoryError
ifsqlite3_value_text()
setsSQLITE_NOMEM
sqlite3_value_bytes()
to find string length; must be called aftersqlite3_value_text()
PyUnicode_FromString
withPyUnicode_FromStringAndSize()
and let errors propagatehttps://bugs.python.org/issue43853