[issue43852] [sqlite3] Harden tuple creation

2021-04-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: I've updated my PR to use PyTuple_Pack. Nice reduction in code size. Thanks, Mark! -- ___ Python tracker ___ ___

[issue43852] [sqlite3] Harden tuple creation

2021-04-15 Thread Erlend Egeberg Aasland
Erlend Egeberg Aasland added the comment: Yes, the _pysqlite_query_execute() case might be cleaner. But I was under the impression that using PyTuple_Pack() was significantly slower. Correct me if I'm wrong. -- ___ Python tracker

[issue43852] [sqlite3] Harden tuple creation

2021-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: Would the code be cleaner if it used PyTuple_Pack? -- nosy: +mark.dickinson ___ Python tracker ___ __

[issue43852] [sqlite3] Harden tuple creation

2021-04-15 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +24153 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25421 ___ Python tracker ___ __

[issue43852] [sqlite3] Harden tuple creation

2021-04-15 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : All but one of the PyTuple_SetItem() calls are executed without checking the return value. Callers: $ grep -r PyTuple_SetItem Modules/_sqlite Modules/_sqlite/connection.c:PyTuple_SetItem(args, i, cur_py_value); Modules/_sqlite/cursor.c: