Author erlendaasland
Recipients berker.peksag, erlendaasland, serhiy.storchaka
Date 2021-05-08.19:43:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Today, the sqlite3 extension module keeps two[1] lists of statements:

 1. The statement cache[2], stored in pysqlite_Connection.statement_cache
 2. A weak ref. list (hard coded limited to 200 statements in _pysqlite_drop_unused_statement_references()), stored in pysqlite_Connection.statements

AFAICS, there's no benefit in keeping both. Suggesting to remove the latter.

- less lines of code to maintain
- clearer code
- one less data member in pysqlite_Connection
- improved test coverage (there are currently no coverage for _pysqlite_drop_unused_statement_references()[3])

- the current code works / "code churn"

$ git diff --shortstat 
 1 file changed, 13 insertions(+), 60 deletions(-)

[1] Actually, there's three lists: SQLite also keeps a list, available using sqlite3_stmt_next()
[2] See bpo-42862 for suggested improvements to the current cache implementation
[3] See bpo-43553 for improving the code coverage of the sqlite3 extension module
Date User Action Args
2021-05-08 19:43:24erlendaaslandsetrecipients: + erlendaasland, berker.peksag, serhiy.storchaka
2021-05-08 19:43:24erlendaaslandsetmessageid: <>
2021-05-08 19:43:24erlendaaslandlinkissue44079 messages
2021-05-08 19:43:24erlendaaslandcreate