◐ Shell
clean mode source ↗

bpo-16379: Expose sqlite error code by palaviv · Pull Request #1108 · python/cpython

@palaviv

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

auvipy

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz rebase!

@matrixise matrixise changed the title bpo-16379: Expose sqlite error code bpo-16379: Expose sqlite error code

May 7, 2019

@matrixise

Hi @palaviv

Would you be interested to upgrade your PR to the last master?

Thank you

@palaviv

Sure @matrixise. Do you think there is a chance for this to be merged?

@dimaqq

@palaviv

@dpusceddu

I'd really really like to have this feature...

dimaqq

{"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.

danielshahaf

#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.

@erlend-aasland

@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.

@erlend-aasland

@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?

@erlend-aasland

Closing this, as #27786 (based off of this PR) has now been merged. Thank you for your work, @palaviv!