[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Adding fprintf's in pysqlite_statement_reset: diff --git a/Modules/_sqlite/statement.c b/Modules/_sqlite/statement.c --- a/Modules/_sqlite/statement.c +++ b/Modules/_sqlite/statement.c @@ -347,19 +363,23 @@ int pysqlite_statement_reset(pysqlite_Statement

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Tests that exercise this branch: Lib/sqlite3/test/dbapi.py: test_in_transaction Lib/sqlite3/test/dbapi.py: test_last_row_id_insert_o_r Lib/sqlite3/test/dbapi.py: test_on_conflict_abort_raises_with_explicit_transactions Lib/sqlite3/test/dbapi.py

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Relevant historical commits: - https://github.com/ghaering/pysqlite/commit/a471f0495956c3b8e3f45895b172e522a9ecd683 - https://github.com/ghaering/pysqlite/commit/5a009ed6fb2e90b952438f5786f93cd1e8ac8722 - 191321d11bc7e064e1a07830a43fa600de310e1b

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Relevant historical commits: - https://github.com/ghaering/pysqlite/commit/a471f0495956c3b8e3f45895b172e522a9ecd683 - https://github.com/ghaering/pysqlite/commit/5a009ed6fb2e90b952438f5786f93cd1e8ac8722 - 191321d11bc7e064e1a07830a43fa600de310e1bj

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-10 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- Removed message: https://bugs.python.org/msg393386 ___ Python tracker <https://bugs.python.org/issue43350> ___ ___ Python-bug

[issue44092] [sqlite3] consider removing special rollback handling

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: BTW, the patch also removes resetting of cursors upon close, which is a little bit out of scope of this bpo. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44092] [sqlite3] consider removing special rollback handling

2021-05-09 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Attached patch includes the test case from bpo-33376. -- ___ Python tracker <https://bugs.python.org/issue44092> ___ ___

[issue44092] [sqlite3] consider removing special rollback handling

2021-05-09 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch Added file: https://bugs.python.org/file50029/patch.diff ___ Python tracker <https://bugs.python.org/issue44

[issue44092] [sqlite3] consider removing special rollback handling

2021-05-09 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Ref. bpo-33376 and bpo-10513. Quoting from the SQLite 3.7.11 changelog[1]: "Pending statements no longer block ROLLBACK. Instead, the pending statement will return SQLITE_ABORT upon next access after the ROLLBACK." Quoting from the SQLi

[issue41930] Wrap sqlite3_serialize API in sqlite3 module

2021-05-09 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FYI, this was just checked into the SQLite fossil repo: $ fossil update trunk updated-to: 6df3b03e00b1143be8fed3a39a58ce8106302027 2021-05-08 17:18:23 UTC tags: trunk comment: Enable the sqlite3_serialize() and sqlite3_deserialize

[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2021-05-09 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- title: [sqlite3] Fix sqlite3_value_text() usage -> [sqlite3] Improve sqlite3_value_text() error handling ___ Python tracker <https://bugs.python.org/issu

[issue44087] [sqlite3] consider adding Py_TPFLAGS_DISALLOW_INSTANTIATION to sqlite3.Statement

2021-05-09 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Currently, the sqlite3.Statement type is not exposed in the module dict: >>> import sqlite3 >>> sqlite3.Statement Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Ver

[issue22956] Improved support for prepared SQL statements

2021-05-09 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +corona10 ___ Python tracker <https://bugs.python.org/issue22956> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22956] Improved support for prepared SQL statements

2021-05-09 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +berker.peksag ___ Python tracker <https://bugs.python.org/issue22956> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22956] Improved support for prepared SQL statements

2021-05-09 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: As Gerhard said in msg233384, there is already a statement cache. sqlite3_prepare_v2() is only called if the statement is not found in the cache. Current behaviour: >>> import sqlite3 >>> cx = sqlite3.connect(":memor

[issue41930] Wrap sqlite3_serialize API in sqlite3 module

2021-05-09 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: What would be the use case for this? -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue41

[issue44079] [sqlite3] remove superfluous statement weak ref list from connection object

2021-05-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- title: [sqlite3] optimisation: remove statement weak ref list from connection object -> [sqlite3] remove superfluous statement weak ref list from connection object ___ Python tracker <https://bugs.pyth

[issue44079] [sqlite3] optimisation: remove statement weak ref list from connection object

2021-05-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +24651 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25998 ___ Python tracker <https://bugs.python.org/issu

[issue44079] [sqlite3] optimisation: remove statement weak ref list from connection object

2021-05-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Berker/Serhiy, weak ref. list question: Could also the pysqlite_Statement.in_weakreflist member go? Seems to be ok: $ git diff --shortstat 3 files changed, 13 insertions(+), 72 deletions(-) $ ./python.exe -m test -R : test_sqlite 0:00:00 load avg: 0.83

[issue44079] [sqlite3] optimisation: remove statement weak ref list from connection object

2021-05-08 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : 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

[issue43992] Unable to get external dependencies for CPython on Ubuntu Linux 20.04.1

2021-05-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Here's a trick I often recommend: Do as the CI; use the posix-deps-apt.sh script! You'll find it in your CPython git repo: $ cd cpython.git # change working dir to the CPython git repo $ cat .github/workflows/posix-deps-apt.sh #!/bin/sh apt-get update

[issue44073] [sqlite3] drop statement in_use field in favour of sqlite3_stmt_busy()

2021-05-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +24636 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25984 ___ Python tracker <https://bugs.python.org/issu

[issue44073] [sqlite3] drop statement in_use field in favour of sqlite3_stmt_busy()

2021-05-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: $ git diff --stat Modules/_sqlite/connection.c | 1 - Modules/_sqlite/cursor.c | 5 + Modules/_sqlite/statement.c | 14 +- Modules/_sqlite/statement.h | 2 -- 4 files changed, 2 insertions(+), 20 deletions

[issue43350] [sqlite3] Active statements are reset twice in _pysqlite_query_execute()

2021-05-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Hm, I guess we could use sqlite3_stmt_busy() instead of the in_use flag. I opened bpo-44073 for this. -- ___ Python tracker <https://bugs.python.org/issu

[issue44073] [sqlite3] drop statement in_use field in favour of sqlite3_stmt_busy()

2021-05-08 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : sqlite3_stmt_busy() has been around since SQLite 3.7.10. I suggest to drop the in_use field of pysqlite_Statement in favour of sqlite3_stmt_busy(); we do not need to duplicate functionality already present in SQLite. There was a bugfix

[issue44066] Conflicts while using Py_LIMITED_API

2021-05-07 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: You need to create your type objects dynamically when using the Limited API. See PEP 384 for how to do so: https://www.python.org/dev/peps/pep-0384/#type-objects Quoting from the PEP: "The structure of type objects is not available to applica

[issue10513] sqlite3.InterfaceError after commit

2021-05-07 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I cannot reproduce this with Python 3.8, 3.9, nor 3.10 (macOS builds from python.org). Suggesting to close this. -- nosy: +erlendaasland status: open -> pending ___ Python tracker <https://bugs.pyth

[issue40617] sqlite3: expose sqlite3_create_window_function

2021-05-05 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add create_window_function() to sqlite3.Connection ___ Python tracker <https://bugs.python

<    4   5   6   7   8   9