Uh oh!
There was an error while loading. Please reload this page.
bpo-16379: Expose sqlite error code - #1108
Conversation
matrixise
commented
May 7, 2019
Hi @palaviv Would you be interested to upgrade your PR to the last master? Thank you |
365ad2a to
c236045Comparepalaviv
commented
May 8, 2019
Sure @matrixise. Do you think there is a chance for this to be merged? |
b9dc556 to
31467e3Comparedimaqq
commented
Jun 7, 2019
If I remember https://bugs.python.org/issue24139 correctly, the issue was rather about exposing the extended error codeshttp://www.sqlite.org/c3ref/c_abort_rollback.html |
palaviv
commented
Jun 11, 2019
@dimaqq you are correct. This is a patch for https://bugs.python.org/issue16379. There is a different patch that depends on this change to solve https://bugs.python.org/issue24139. |
dpusceddu
commented
Apr 22, 2020
I'd really really like to have this feature... |
| {"PARSE_COLNAMES", PARSE_COLNAMES}, | ||
| {"SQLITE_OK", SQLITE_OK}, | ||
| /* enumerated return values for sqlite3_set_authorizer() callback */ |
There was a problem hiding this comment.
It looks like SQLITE_OK is used in the wild (https://github.com/search?l=Python&p=4&q=SQLITE_OK&type=Code) thus it cannot be removed.
There was a problem hiding this comment.
SQLITE_OK is definitely in use. For example, it is used one of the valid return values in authoriser callbacks.
| #ifdef SQLITE_NOTADB | ||
| {"SQLITE_NOTADB", SQLITE_NOTADB}, | ||
| #endif | ||
| {"SQLITE_DONE", SQLITE_DONE}, |
There was a problem hiding this comment.
Hi @palaviv, thanks for picking this up. Should SQLITE_NOTICE and SQLITE_WARNING be added to this list?
erlend-aasland
commented
Apr 8, 2021
@palaviv: Can you rebase onto master and update your code to PEP 7 standards? Also, the |
erlend-aasland
commented
Aug 6, 2021
@palaviv, are you planning on landing this PR? If not, would you mind if I reopened a PR with your changes cherry-picked onto it? |
This PR adds the sqlite error code and name to the exceptions raised by the sqlite3 module. Once this is merged my hope is to expose the sqlite extended error code as discussed in bpo-24139
https://bugs.python.org/issue16379