[New-bugs-announce] [issue45041] [sqlite3] simplify executescript()

Erlend E. Aasland report at bugs.python.org
Sat Aug 28 17:42:20 EDT 2021


New submission from Erlend E. Aasland <erlend.aasland at innova.no>:

See also bpo-45040

Since sqlite3_finalize() will pass on any error message set by sqlite3_step(), we can greatly simplify SQLite C API usage and error handling in sqlite3.Cursor.executescript(), thus reducing the number of times we save/restore thread state, and also simplifying error handling greatly.

We can also "inline" the commit before the main loop using the SQLite API directly, instead of calling self.commit()

Diffstat for the proposed patch:
1 file changed, 25 insertions(+), 42 deletions(-)

----------
components: Extension Modules
messages: 400505
nosy: erlendaasland
priority: low
severity: normal
status: open
title: [sqlite3] simplify executescript()
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45041>
_______________________________________


More information about the New-bugs-announce mailing list