Title: [sqlite3] unused variables in Connection begin, commit, and rollback
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.10
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, erlendaasland, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2021-02-22 10:06 by erlendaasland, last changed 2021-02-26 14:30 by berker.peksag. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 24658 merged erlendaasland, 2021-02-26 08:48
Messages (2)
msg387510 - (view) Author: Erlend E. Aasland (erlendaasland) * (Python triager) Date: 2021-02-22 10:06
In Modules/_sqlite/connection.c:
pysqlite_connection_commit_impl(), pysqlite_connection_rollback_impl(), and _pysqlite_connection_begin() all call sqlite3_prepare_v2() with the fourth parameter (pzTail) set. This (output) parameter is never used, we can safely remove the tail variables, and just call sqlite3_prepare_v2() with NULL as the fourth parameter.

Also, there's a lot of code duplication here. A support function could help simplify this, but that's out of scope.
msg387725 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2021-02-26 14:30
New changeset 5e48e836883ac577acd69c7b9bdfe5c439cef47f by Erlend Egeberg Aasland in branch 'master':
bpo-43294: Remove unused variables in pysqlite_connection_*() (GH-24658)
Date User Action Args
2021-02-26 14:30:54berker.peksagsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-02-26 14:30:29berker.peksagsetmessages: + msg387725
2021-02-26 08:48:07erlendaaslandsetkeywords: + patch
stage: patch review
pull_requests: + pull_request23443
2021-02-22 10:06:47erlendaaslandcreate