[issue46907] Update Windows and MacOS installer to SQLite 3.38.1

2022-03-15 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Closing this tonight, unless someone objects. -- status: open -> pending ___ Python tracker <https://bugs.python.org/issu

[issue46907] Update Windows and MacOS installer to SQLite 3.38.1

2022-03-15 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: -> fixed stage: patch review -> resolved status: pending -> closed ___ Python tracker <https://bugs.python.or

[issue47019] Fatal Python Error in sqlite3 Python 3.10

2022-03-15 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > If you connect with check_same_thread=False, I believe the issue may still > present itself on 3.11+ Nope, works swell on my Mac. Do you see this on Linux with latest 3.11? -- ___ Python tracker

[issue47019] Fatal Python Error in sqlite3 Python 3.10

2022-03-15 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: All callbacks triggered from external libraries must protect Python C API calls. You may call it offending, but that is the reality; a callback may trigger at any point in time, so we need to make sure the GIL is held before calling any Py API. That is

[issue47019] Fatal Python Error in sqlite3 Python 3.10

2022-03-15 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: See also bpo-44304 -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue47019> ___ ___ Python-bugs-list m

[issue47019] Fatal Python Error in sqlite3 Python 3.10

2022-03-15 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: See also Petrs msg400205: > [...] I recommend that any function passed to SQLite (and only those) should > - be named `*_callback`, for clarity > - acquire the GIL at the very start > - release the GIL at

[issue47019] Fatal Python Error in sqlite3 Python 3.10

2022-03-15 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FYI, PyGILState_Ensure may be called by a thread as many times as you want, and it has been so for a very long time. -- ___ Python tracker <https://bugs.python.org/issue47

[issue47019] Fatal Python Error in sqlite3 Python 3.10

2022-03-15 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Maybe related: bpo-20891 -- ___ Python tracker <https://bugs.python.org/issue47019> ___ ___ Python-bugs-list mailin

[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2022-03-29 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > The C++20 "module" keyword is "contextual keyword". It's only a keyword if > the first line if a file contains "module". Great! No changes needed. Thanks for investigating. -- _

[issue46907] Update Windows and MacOS installer to SQLite 3.38.2

2022-03-29 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Let's hold these PRs a couple of weeks in case more patch releases appear. IMO we can hold it until a week or two before the beta phase kicks in. -- ___ Python tracker <https://bugs.python.org/is

[issue46907] Update Windows and MacOS installer to SQLite 3.38.2

2022-03-31 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Erlend - would you be up for write permissions on the cpython-source-deps > repo so you can push the SQLite updates yourself. Yep, I’m fine with that. -- ___ Python tracker <https://bugs.p

[issue46907] Update Windows and MacOS installer to SQLite 3.38.2

2022-03-31 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Great, thanks :) -- ___ Python tracker <https://bugs.python.org/issue46907> ___ ___ Python-bugs-list mailing list Unsub

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-02 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Anthony: you should be able to build the _tkinter by manually specifying the compiler and linker flags using the `TCLTK_CFLAGS` and `TCLTK_LIBS` environment variables. AFAICS, the flags provided by pkgconfig in Ubuntu 20.04 should work well in 18.04

[issue45774] Detect SQLite in configure.ac

2022-04-05 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[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

[issue43949] binascii.Error raised in smtplib when initial_response_ok=False

2021-05-05 Thread Pandu E POLUAN
Pandu E POLUAN added the comment: Technically, that is not the fault of smtplib.SMTP The standard for SMTP AUTH specifies that characters following "334 " MUST be Base64 encoded. See https://tools.ietf.org/html/rfc4954#page-4 , 3rd paragraph: > A server challenge is sent a

[issue43949] binascii.Error raised in smtplib when initial_response_ok=False

2021-05-05 Thread Pandu E POLUAN
Pandu E POLUAN added the comment: A stronger case is the "Formal Syntax" on https://tools.ietf.org/html/rfc4954#page-13 : > continue-req= "334" SP [base64] CRLF > ;; Intermediate response to the AUTH >

[issue43949] binascii.Error raised in smtplib when initial_response_ok=False

2021-05-05 Thread Pandu E POLUAN
Pandu E POLUAN added the comment: > I am using Magic Winmail Server2.4(build 0530) as a SMTP server, which > appears dont support initial_response, so I set initial_response_ok=False and > got this Error. currently I catch this error and ignore it to evade program > failed, i

[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

[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

[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 for

[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
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

[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

[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-

[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

[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
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] 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

[issue41930] Wrap sqlite3_serialize API in sqlite3 module

2021-05-08 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

[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

[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
Change by Erlend E. Aasland : -- nosy: +corona10 ___ Python tracker <https://bugs.python.org/issue22956> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

[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

[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

[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

[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
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-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

[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

[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 (in

[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 (in

[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: 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_Stat

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

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: fprintf debugging patch added, for reference -- Added file: https://bugs.python.org/file50032/fprintf.diff ___ Python tracker <https://bugs.python.org/issue43

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

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Complete fprintf log added, for reference. -- Added file: https://bugs.python.org/file50033/log.txt ___ Python tracker <https://bugs.python.org/issue43

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

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Grep for SECONDRESET in log.txt to get the complete "API context". As far as I can see, there is no harm in removing the redundant reset statement. -- ___ Python tracker <https://bugs.python.o

[issue44092] [sqlite3] consider removing special rollback handling

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Quoting pysqlite commit 5a009ed message (https://github.com/ghaering/pysqlite/commit/5a009ed6fb2e90b952438f5786f93cd1e8ac8722): "Implemented a function that resets all statements in the connection's statement cache. After calling this func

[issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction

2021-05-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I believe the former proposed solution is the correct solution. I'm digging though the pysqlite git history (both in the original repo and in CPython), the SQLite changelogs, and different test suites to prove me wrong :) I'm using bpo-44092 t

[issue44092] [sqlite3] consider removing special rollback handling

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

[issue44106] [sqlite3] don't use politicians in examples/docs

2021-05-10 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : In GH-25003, we rewrote one of the database examples to use programming languages iso. political persons. However, there are still some politicians lurking in the sqlite3 docs. Suggesting to get rid of those as well. See also Berker's comment:

[issue44106] [sqlite3] don't use politicians in examples/docs

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

[issue44106] [sqlite3] don't use politicians in examples/docs

2021-05-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Berker, the following files are not included by Doc/library/sqlite3.rst: - Doc/includes/sqlite3/countcursors.py - Doc/includes/sqlite3/createdb.py # never referenced by docs - Doc/includes/sqlite3/execsql_fetchonerow.py - Doc/includes/sqlite3

[issue44106] [sqlite3] don't use politicians in examples/docs

2021-05-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Ditto for Doc/includes/sqlite3/insert_more_people.py -- ___ Python tracker <https://bugs.python.org/issue44106> ___ ___

[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite

2021-05-11 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Most of the SQL statements in the sqlite3 test suite correctly uses single quote literals, except test_unicode_content in Lib/sqlite3/test/hooks.py, which uses double quote literals (not ANSI SQL compatible, IIRC). Adapting this test to also use single

[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite

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

[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite

2021-05-11 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Digression: test_unicode_content should be named test_trace_unicode_content, in order to express the purpose of the test more clearly, should it fail. -- ___ Python tracker <https://bugs.python.org/issue44

[issue28528] Pdb.checkline() attribute error when 'curframe' is None

2021-05-12 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24693 pull_request: https://github.com/python/cpython/pull/26053 ___ Python tracker <https://bugs.python.org/issue28

[issue28528] Pdb.checkline() attribute error when 'curframe' is None

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Yes, test.os_helper was introduced in 3.10. I've manually cherry-picked 8563a7052ccd98e6a381d361664ce567afd5eb6e to 3.9 (GH-26053). -- ___ Python tracker <https://bugs.python.org/is

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Could it be that the _csv heap types are not garbage collected? Ref. bpo-42972. -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue44

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Change by Erlend E. Aasland : Added file: https://bugs.python.org/file50038/gc.diff ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list m

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Adding GC to _csv types: $ cat import sys import gc for i in range(10): import csv del sys.modules['_csv'] del sys.modules['csv'] del csv gc.collect() print(sys.gettotalrefcount()) $ ./python.exe bug.py 731

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I created a quick-and-dirty patch. I can clean it up and make it into a PR if you want. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Sure, I’ll do it after dinner :) -- ___ Python tracker <https://bugs.python.org/issue44116> ___ ___ Python-bugs-list mailin

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

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

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I don't understand this. After applying PR-26074, test_csv now leaks memory/refs: $ ./python.exe -m test -R : test_csv 0:00:00 load avg: 1.18 Run tests sequentially 0:00:00 load avg: 1.18 [1/1] test_csv beginning 9 repetitions 123456789 . tes

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Also, for some reason two first iterations of the reproducer prints 2 less ref counts. -- ___ Python tracker <https://bugs.python.org/issue44

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Changes to _csv.Error should not be necessary, there everything is handled by > the superclass. Got it; thanks. -- ___ Python tracker <https://bugs.python.org/i

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Yeah, that helped a lot: test_csv leaked [487, 487, 487, 487] memory blocks, sum=1948 Thanks! :) -- ___ Python tracker <https://bugs.python.org/issue44

[issue40645] Use OpenSSL's HMAC API

2021-05-12 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland nosy_count: 6.0 -> 7.0 pull_requests: +24718 pull_request: https://github.com/python/cpython/pull/26079 ___ Python tracker <https://bugs.python.org/issu

[issue44116] The _csv module can't be garbage-collected after _csv.register_dialect is called

2021-05-12 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Pablo, as mentioned in bpo-42972, this is an issue with all heap allocated types; it is not _csv specific. I know that work with heap types have been halted by the SC, as you've pointed out a couple of times already, but shouldn't this heap typ

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-13 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24746 pull_request: https://github.com/python/cpython/pull/26104 ___ Python tracker <https://bugs.python.org/issue42

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-13 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I've added a checkbox for types that fully implement the GC protocol to https://discuss.python.org/t/list-of-built-in-types-converted-to-heap-types/8403/1. Heap types that fully implement the GC protocol: * _abc._abc_data * _bz2.BZ2Compressor *

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-13 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24759 pull_request: https://github.com/python/cpython/pull/26114 ___ Python tracker <https://bugs.python.org/issue42

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-13 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: -23226 ___ Python tracker <https://bugs.python.org/issue42972> ___ ___ Python-bugs-list mailing list Unsub

[issue44108] [sqlite3] normalise SQL quoted literals in sqlite3 test suite

2021-05-14 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24767 pull_request: https://github.com/python/cpython/pull/26128 ___ Python tracker <https://bugs.python.org/issue44

[issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol

2021-05-14 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Is there a deterministic way to test these changes? Will something a la this be sufficient: import gc import sys gc.collect() before = sys.gettotalrefcount() import somemod del sys.modules['somemod'] del somemod gc.colle

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-05-14 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker <https://bugs.python.org/issue42862> ___ ___ Python-bugs-list mailin

[issue38768] [feature request] Add lldb equivalent to Tools/gdb

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

[issue10513] sqlite3.InterfaceError after commit

2021-05-15 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Closing as fixed. If someone disagrees; please re-open. -- resolution: -> fixed status: pending -> closed ___ Python tracker <https://bugs.python.org/i

[issue27334] pysqlite3 context manager not performing rollback when a database is locked elsewhere for non-DML statements

2021-05-17 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland nosy_count: 3.0 -> 4.0 pull_requests: +24819 pull_request: https://github.com/python/cpython/pull/26202 ___ Python tracker <https://bugs.python.org/issu

[issue27334] [sqlite3] context manager leaves db locked if commit fails in __exit__

2021-05-17 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > In fact the exception is in the `pass` line rather than in the `execute` line. I can reproduce this without the `pass` line. I've taken the liberty to create a PR based on your patch, Luca. Berker's comments have been addres

[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size

2021-05-18 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : The signature of sqlite3_prepare_v2 is as follows: int sqlite3_prepare_v2( sqlite3 *db,/* Database handle */ const char *zSql, /* SQL statement, UTF-8 encoded */ int nByte, /* Maximum length of zSql in bytes

[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size

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

[issue44165] [sqlite3] sqlite3_prepare_v2 micro optimisation: pass string size

2021-05-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Note, PR 26206 does not include statement creation in _pysqlite_connection_begin (Modules/_sqlite/connection.c). That needs further refactoring, so I'll add that in a separate PR if PR 26206 is acc

[issue44147] [WinError 193] %1 is not a valid Win32 application

2021-05-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Setting status to pending again. (Seems like bpo likes this dance) -- nosy: +erlendaasland status: open -> pending ___ Python tracker <https://bugs.python.org/issu

[issue44147] [WinError 193] %1 is not a valid Win32 application

2021-05-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Eryk, Steve, can we close this? AFAICT, this belongs to a user forum. Shreyan: it seems like a bpo bug to me. I have a feeling closing the issue will help. -- ___ Python tracker <https://bugs.python.

[issue35889] sqlite3.Row doesn't have useful repr

2021-05-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > What about a __repr__ that includes the primary key value(s) (for tables > where that is defined)? I’d rather have that as a Row method, or read-only property. It should be straight-forward to implement. SQLite provides an API for such pu

[issue35889] sqlite3.Row doesn't have useful repr

2021-05-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: See: - https://www.sqlite.org/c3ref/column_database_name.html - https://www.sqlite.org/c3ref/table_column_metadata.html Notice that the former is only available if SQLITE_ENABLE_COLUMN_METADATA was defined at compile time

[issue30593] sqlite3 executescript does not respect isolation_level?

2021-05-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Mentioning this behaviour in the documentation should be sufficient. -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +berker.peksag, docs@python, erlendaasland versions: +Python 3.10, Python 3.11, Python 3.9 -Python

[issue30593] sqlite3 executescript does not respect isolation_level?

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

[issue30593] Document that sqlite3.Cursor.executescript disregards isolation_level

2021-05-18 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- title: sqlite3 executescript does not respect isolation_level? -> Document that sqlite3.Cursor.executescript disregards isolation_level ___ Python tracker <https://bugs.python.org/issu

[issue27334] [sqlite3] context manager leaves db locked if commit fails in __exit__

2021-05-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > I believe the reason for this problem is that the exception happened in the > implicit `commit` that is run on exiting the context manager, rather than > inside it. In fact the exception is in the `pass` line rather than in the > `execute

[issue44106] [sqlite3] don't use politicians in examples/docs

2021-05-19 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +24851 pull_request: https://github.com/python/cpython/pull/26234 ___ Python tracker <https://bugs.python.org/issue44

[issue21465] sqlite3 Row can return duplicate keys when using adapters

2021-05-19 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: AFAICS, this has nothing to do with adapters; you'll get duplicate keys just by executing 'select 1 as "token", 2 as "token"'. If you want the columns to have unique names, you should assign them unique names. At mo

[issue44106] [sqlite3] don't use politicians in examples/docs

2021-05-19 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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

2021-05-19 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Yes, that seems to be the intention. But, I don't think there is a need to maintain the second list: 1. Resetting statements was historically needed both for commit and rollback; pending statements would block such operations. That's no longe

[issue44092] [sqlite3] consider removing special rollback handling

2021-05-19 Thread Erlend E. Aasland
Change by Erlend E. Aasland : Removed file: https://bugs.python.org/file50029/patch.diff ___ Python tracker <https://bugs.python.org/issue44092> ___ ___ Python-bug

[issue44092] [sqlite3] consider removing special rollback handling

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

<    1   2   3   4   5   6   7   8   9   10   >