bpo-32788: Better error handling in sqlite3. - #3723
Conversation
PyDict_GetItem() and PyObject_HasAttrString() in sqlite3.
berkerpeksag
left a comment
There was a problem hiding this comment.
I have an old computer with no SQLite installed at the moment, but I think most of the patch looks good and safe to me. I have a question and a couple of comments:
-
Did you notice these by reading the code or noticed while using the module? For example,
pysqlite_cache_get()(although it's exposed the cache implementation is an implementation detail and basically useless for third-party uses: https://bugs.python.org/issue30262) is only used by_pysqlite_query_execute()and it only accepts a string object. The only exception that may be raised here is OOM. -
I'm fine with making old code PEP 7 compliant if you've already change the signature of the function, but in cases like below, I think it's better to keep the old code as-is:
-static int check_cursor(pysqlite_Cursor* cur) +static int +check_cursor(pysqlite_Cursor* cur)
The rest is fine because you've added
staticto them. -
I haven't look at the code in
microprotocols.crecently, so I still need a bit more time to review it and the code relevant to it (e.g.statement.c)
I missed that
I think that would be great if you have time to do so :) |
dd78e66 to
c5bc2a6
Compare
|
@berkerpeksag, have I addressed all your comments? Could you please take a look at this PR again? |
|
I am going to merge this PR. |
berkerpeksag
left a comment
There was a problem hiding this comment.
LGTM, thanks! I'd like to deprecate and eventually get rid of this pre-PEP 246 protocol.
BTW, I'm moving to a new country in a month, so I don't have time to closely check my GitHub notifications. Feel free to send me an email if I'm blocking a pull request.

https://bugs.python.org/issue32788