bpo-16379: Expose sqlite error code by palaviv · Pull Request #1108 · python/cpython
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
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz rebase!
matrixise
changed the title
bpo-16379: Expose sqlite error code
bpo-16379: Expose sqlite error code
Sure @matrixise. Do you think there is a chance for this to be merged?
| {"PARSE_COLNAMES", PARSE_COLNAMES}, | ||
|
|
||
| {"SQLITE_OK", SQLITE_OK}, | ||
| /* enumerated return values for sqlite3_set_authorizer() callback */ |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}, |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@palaviv: Can you rebase onto master and update your code to PEP 7 standards? Also, the #ifdefs are not needed as SQLite 3.7.15 is now a hard requirement.
@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?