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

2021-08-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thanks for merging the NEWS amendments, Pablo. We can close this issue after landing PR 27642. -- ___ Python tracker <https://bugs.python.org/issue43

[issue45007] OpenSSL 1.1.1l is released

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

[issue44997] [sqlite3] build fails on macOS 11.5.1

2021-08-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: ...or we can just leave it as it. Seems like these reports only pops up once in a while. -- ___ Python tracker <https://bugs.python.org/issue44

[issue43398] [sqlite3] sqlite3.connect() segfaults if given a faulty Connection factory

2021-08-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: This issue has been fixed by recent sqlite3 improvements. Suggesting to still expand the test suite with tests for defect connection factories. -- status: open -> pending ___ Python tracker <

[issue43398] [sqlite3] sqlite3.connect() segfaults if given a faulty Connection factory

2021-08-26 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26413 status: pending -> open pull_request: https://github.com/python/cpython/pull/27966 ___ Python tracker <https://bugs.python.org/issu

[issue43398] [sqlite3] sqlite3.connect() segfaults if given a faulty Connection factory

2021-08-26 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue43398> ___ ___ Python-bugs-list mailing list Un

[issue36073] sqlite crashes with converters mutating cursor

2021-08-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: This issue was fixed by GH-27884 (bpo-44976). I suggest to expand the test suite with the reproducer Sergey provided before closing the issue. -- status: open -> pending ___ Python tracker <

[issue36073] sqlite crashes with converters mutating cursor

2021-08-26 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- status: pending -> open Removed message: https://bugs.python.org/msg400334 ___ Python tracker <https://bugs.python.org/issu

[issue36073] sqlite crashes with converters mutating cursor

2021-08-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: After GH-27884 (bpo-44976) there is no longer a segfault. I suggest to expand the test suite with the reproducer Sergey provided. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36073] sqlite crashes with converters mutating cursor

2021-08-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Er, a little bit too fast there. There is still a crash, but it is of course postponed bco. bpo-44976. New reproducer: import sqlite3 as sqlite con = sqlite.connect(':memory:', detect_types=sqlite.PARSE_COLNAMES) cur = con.cursor() sqlite.

[issue44997] [sqlite3] build fails on macOS 11.5.1

2021-08-26 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: fixed -> status: closed -> open ___ Python tracker <https://bugs.python.org/issue44997> ___ ___ Python-bugs-

[issue44997] [sqlite3] build fails on macOS 11.5.1

2021-08-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thanks, Ronald, that's a nice improvement. I'll create a PR for it. -- ___ Python tracker <https://bugs.python.o

[issue44997] [sqlite3] build fails on macOS 11.5.1

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

[issue44972] Add workflow_dispatch trigger for GitHub Actions jobs

2021-08-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Neat! Thanks :) -- ___ Python tracker <https://bugs.python.org/issue44972> ___ ___ Python-bugs-list mailing list Unsub

[issue45025] Reliance on C bit fields in C API is undefined behavior

2021-08-27 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +petr.viktorin ___ Python tracker <https://bugs.python.org/issue45025> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-08-28 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thanks Luca, for the report, reproducer, and initial patch, Berker for helpful suggestion, and Łukasz, Pablo, & Victor for reviewing and merging. -- resolution: -> fixed stage: patch review -> resolved status: open

[issue45040] [sqlite3] optimise transaction control functions

2021-08-28 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : pysqlite_connection_commit_impl(), pysqlite_connection_rollback_impl(), and begin_transaction() can be simplified: sqlite3_finalize() will pass on any error set by sqlite3_step(). This implies that we only need to check the return value of

[issue45040] [sqlite3] optimise transaction control functions

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

[issue45041] [sqlite3] simplify executescript()

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

[issue45041] [sqlite3] simplify executescript()

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

[issue34561] Replace list sorting merge_collapse()?

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

[issue43398] [sqlite3] sqlite3.connect() segfaults if given a faulty Connection factory

2021-08-30 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Is something missing here? No; all good. Thanks! -- ___ Python tracker <https://bugs.python.org/issue43398> ___ ___ Py

[issue16379] SQLite error code not exposed to python

2021-08-30 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thanks, Torsten for this nice suggestion, Daniel & Aviv for the initial patches, Gerhard & Ezio for helping improving the API, and Pablo, Asif, Hai Shi, & Michael for reviewing and merging! -- resolution: -> fixed stage: patch rev

[issue45041] [sqlite3] simplify executescript()

2021-08-30 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26518 pull_request: https://github.com/python/cpython/pull/28074 ___ Python tracker <https://bugs.python.org/issue45

[issue24139] Use sqlite3 extended error codes

2021-08-30 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26520 pull_request: https://github.com/python/cpython/pull/28076 ___ Python tracker <https://bugs.python.org/issue24

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thanks, good catch! I'll add that after PR 27934 is merged. -- ___ Python tracker <https://bugs.python.org/is

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > The state doesn't have a refcount, but it is owned by a module object, so > callback_context should own a reference to the module object. Would it be sufficient to hold a reference to the connection object? The connection holds a refer

[issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)

2021-08-31 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26531 pull_request: https://github.com/python/cpython/pull/28088 ___ Python tracker <https://bugs.python.org/issue44

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: >> Would it be sufficient to hold a reference to the connection object? > > Yes Good, that simplifies things. I'll wait with this until we've resolved PR 27940 though. -- ___

[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-02 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Currently, two calls can raise exceptions in the _trace_callback() in Modules/_sqlite/connection.c: 1. PyUnicode_DecodeUTF8() can raise an exception 2. PyObject_CallOneArg() — calling the user callback — can raise an exception Currently, we either

[issue45089] [sqlite3] the trace callback does not raise exceptions on error

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

[issue44958] [sqlite3] only reset statements when needed

2021-09-06 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: In msg399939, item 2 lacks one more "reset path": > 2. at cursor exit, if there's an active statement Rewording this to: 2. when a statement is removed from a cursor; that is either at cursor dealloc, or when the current sta

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-07 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Quoting Petr Viktorin in PR 27940, https://github.com/python/cpython/pull/27940#discussion_r703424148: - db is not set to NULL if init fails. - This segfaults for me: import sqlite3 conn = sqlite3.connect(':memory:') conn.execute(&#x

[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-07 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Quoting Petr from PR 28133: Without the ability to tell SQLite to abort on trace failure, I doubt we can do much better than the current behavior. Getting an exception and having the data inserted seems quite irregular. Closing this issue as won&#

[issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)

2021-09-07 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26634 pull_request: https://github.com/python/cpython/pull/28209 ___ Python tracker <https://bugs.python.org/issue44

[issue45126] [sqlite3] cleanup and harden connection init

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

[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-09-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > It *would* be possible to improve the documentation, though. +1 -- ___ Python tracker <https://bugs.python.org/issu

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I modified your second example slightly: ``` import sqlite3 conn = sqlite3.connect(":memory:") conn.text_factory=bytes conn.row_factory = sqlite3.Row cursor = conn.execute("CREATE TABLE foo (bar)") numbers = range(4) cursor.executem

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Note: I ran that with PR 28227. OTOH: I do agree that there's a lot of pitfalls here, especially in the future. In the long run, it is probably best to deprecate reinit, and disable it in Python

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Modifying the loops to also print the values: first fetch b'0' b'1' second fetch 2 3 -- ___ Python tracker <https://bug

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FYI, I've expanded the reinit tests and added a deprecation warning to the PR. -- ___ Python tracker <https://bugs.python.org/is

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Great, thanks. -- ___ Python tracker <https://bugs.python.org/issue45126> ___ ___ Python-bugs-list mailing list Unsub

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > If we deprecate but keep the buggy behavior it as it is, (1) is not needed. > Less work for both us and the users. Indeed. There's still a ref leak I'd like to take care of, though: if the first audit fails, da

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26651 pull_request: https://github.com/python/cpython/pull/28231 ___ Python tracker <https://bugs.python.org/issue45

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26654 pull_request: https://github.com/python/cpython/pull/28234 ___ Python tracker <https://bugs.python.org/issue45

[issue45126] [sqlite3] cleanup and harden connection init

2021-09-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I'll save the cleanup till Python 3.13 dev is started. I've opened a PR for fixing the ref leak (should be backported), and a draft PR for deprecating Connection and Cursor reinitialisation. --

[issue38371] Tkinter: deprecate the split() method

2021-09-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland nosy_count: 1.0 -> 2.0 pull_requests: +26657 pull_request: https://github.com/python/cpython/pull/28237 ___ Python tracker <https://bugs.python.org/issu

[issue45089] [sqlite3] the trace callback does not raise exceptions on error

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

[issue45138] [sqlite3] expand bound values in traced statements if possible

2021-09-08 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : For SQLite 3.14.0 and newer, we're using the v2 trace API. This means that the trace callback receives a pointer to the sqlite3_stmt object. We can use the sqlite3_stmt pointer to retrieve expanded SQL string. The following stat

[issue45138] [sqlite3] expand bound values in traced statements if possible

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

[issue45138] [sqlite3] expand bound values in traced statements when possible

2021-09-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- title: [sqlite3] expand bound values in traced statements if possible -> [sqlite3] expand bound values in traced statements when possible ___ Python tracker <https://bugs.python.org/issu

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-09-08 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I did some experiments using the connection object as a "backref" in the callback context, but it seems that the GC does not play well with such ref circles; I ended up with a lot of ref leaks (yes, I modified the traverse and clear slots to

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-09-08 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26661 pull_request: https://github.com/python/cpython/pull/28242 ___ Python tracker <https://bugs.python.org/issue42

[issue45126] [sqlite3] cleanup and harden Connection and Cursor __init__

2021-09-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Updated title to include sqlite3.Cursor as well, since cursors and connections are very much entwined. -- title: [sqlite3] cleanup and harden connection init -> [sqlite3] cleanup and harden Connection and Cursor __ini

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

2021-09-10 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Serhiy, I believe I've addressed your review remarks on PR 27642. Would you mind taking a look at it again if you have time? -- ___ Python tracker <https://bugs.python.org/is

[issue45126] [sqlite3] cleanup and harden Connection and Cursor __init__

2021-09-12 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26712 pull_request: https://github.com/python/cpython/pull/28298 ___ Python tracker <https://bugs.python.org/issue45

[issue5846] Deprecate obsolete functions in unittest

2021-09-12 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26713 pull_request: https://github.com/python/cpython/pull/28299 ___ Python tracker <https://bugs.python.org/issue5

[issue45177] Use shared test loader when possible when running test suite

2021-09-12 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Use unittest.defaultTestLoader instead of unittest.TestLoader() when possible, to avoid creating unnecessary many instances. -- components: Tests messages: 401674 nosy: erlendaasland, serhiy.storchaka priority: normal severity: normal status

[issue45177] Use shared test loader when possible when running test suite

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

[issue45177] Use shared test loader when possible when running test suite

2021-09-13 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Also, TestLoader has mutable attribute "errors". I am not sure that it is > good idea to share it between unrelated tests. Noted. I'm closing this. -- resolution: -> rejected stage: patch review -> reso

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

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

[issue44848] Upgrade macOS and Windows installers to use SQLite 3.36.0

2021-09-17 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thanks, Steve. I'll pull in main and see how the CI fares. -- ___ Python tracker <https://bugs.python.org/is

[issue5846] Deprecate obsolete functions in unittest

2021-09-17 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: _makeLoader is not deprecated yet, so we might keep this open a little bit more. -- ___ Python tracker <https://bugs.python.org/issue5

[issue5846] Deprecate obsolete functions in unittest

2021-09-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > It is an internal function. We can remove it without deprecation. How convenient :) -- ___ Python tracker <https://bugs.python.org/iss

[issue45116] Performance regression 3.10b1 and later on Windows: Py_DECREF() not inlined in PGO build

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

[issue45243] [sqlite3] add support for changing connection limits

2021-09-19 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : I propose to add wrappers for the SQLite sqlite3_limit() C API. Using this API, it is possible to query and set limits on a connection basis. This will make it easier (and faster) to test various corner cases in the test suite without relying on

[issue45041] [sqlite3] simplify executescript()

2021-09-19 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thanks for reviewing, Pablo! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45243] [sqlite3] add support for changing connection limits

2021-09-19 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Christian, how about adding an audit event for something like sqlite3.Connection.setlimit()? My initial thought is: yes. -- nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/issue45

[issue45243] [sqlite3] add support for changing connection limits

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

[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)

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

[issue44848] Upgrade macOS and Windows installers to use SQLite 3.36.0

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

[issue44958] [sqlite3] only reset statements when needed

2021-09-21 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26886 pull_request: https://github.com/python/cpython/pull/28490 ___ Python tracker <https://bugs.python.org/issue44

[issue44958] [sqlite3] only reset statements when needed

2021-09-21 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Now that pysqlite_statement_reset() is only used in cursor.c, I suggest to move it to cursor.c and make it a static function. -- ___ Python tracker <https://bugs.python.org/issue44

[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

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

[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Could it instead throw a FileNotFoundError if the db simply doesn't exist at > the specified path? We pass the database path pretty much straight to sqlite3_open_v2(), via the os.PathLike interface, so any errors we get come straight from SQ

[issue45255] sqlite3.connect() should check if the sqlite file exists and throw a FileNotFoundError if it doesn't

2021-09-21 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- status: open -> pending ___ Python tracker <https://bugs.python.org/issue45255> ___ ___ Python-bugs-list mailing list Un

[issue45041] [sqlite3] simplify executescript()

2021-09-21 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26906 pull_request: https://github.com/python/cpython/pull/28509 ___ Python tracker <https://bugs.python.org/issue45

[issue44958] [sqlite3] only reset statements when needed

2021-09-21 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Now that pysqlite_statement_reset() is only used in cursor.c, I suggest to > move it to cursor.c and make it a static function. I'll wait until PR 25984 is merged before opening a PR for relocating pysqlite_stat

[issue44958] [sqlite3] only reset statements when needed

2021-09-22 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Ouch, that's quite a regression! Thanks for the heads up! I'll have a look at it right away. -- ___ Python tracker <https://bugs.python.o

[issue44958] [sqlite3] only reset statements when needed

2021-09-22 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I'm unable to reproduce this regression on my machine (macOS, debug build, no optimisations). Are you able to reproduce, Ken? -- ___ Python tracker <https://bugs.python.org/is

[issue44958] [sqlite3] only reset statements when needed

2021-09-22 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > I'm unable to reproduce this regression on my machine (macOS, debug build, no > optimisations) [...] Correction: I _am_ able to reproduce this. -- ___ Python tracker <https://bugs.python.

[issue44958] [sqlite3] only reset statements when needed

2021-09-23 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Explicitly resetting statements when we're done with them removes the performance regression; SQLite works more efficient when we keep the number of non-reset statements low. -- ___ Python tracker &

[issue44958] [sqlite3] only reset statements when needed

2021-09-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I'll revert PR 27844 for now (except the tests). Since SQLite works better when we keep the number of non-reset statements to a minimum, we need to ensure that we reset statements when we're done with them (sqlite3_step() returns SQLITE_DONE o

[issue44958] [sqlite3] only reset statements when needed

2021-09-26 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26956 pull_request: https://github.com/python/cpython/pull/28574 ___ Python tracker <https://bugs.python.org/issue44

[issue45089] [sqlite3] the trace callback does not raise exceptions on error

2021-10-04 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- resolution: wont fix -> fixed ___ Python tracker <https://bugs.python.org/issue45089> ___ ___ Python-bugs-list mailing list Un

[issue45335] Default TIMESTAMP converter in sqlite3 ignores time zone

2021-10-04 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Replacing the timestamp converter with datetime.datetime.fromisoformat sounds good to me. -- ___ Python tracker <https://bugs.python.org/issue45

[issue29410] Moving to SipHash-1-3

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

[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > [...] if sqlite3 starts returning aware datetimes, existing code might break. True. > [...] perhaps this could be fixed in conjunction with changing sqlite3's API > to allow per-database converters and adapters Another option could be to

[issue45374] sqlite3: Add configure option to set or auto-detect rpath to sqlite3 libs

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

[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-05 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > I'd be interested in working on this myself, if you think it's something that > a new CPython contributor could handle. Please, go ahead :) However, I think this should be discussed on Discourse first (open a topic in the Core Deve

[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-07 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: See also: - bpo-19065: sqlite3 timestamp adapter chokes on timezones - bpo-26651 Deprecate register_adapter() and register_converter() in sqlite3 (Adding Berker to nosy list.) -- nosy: +berker.peksag

[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-10-07 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Yes, deprecating the preconfigured adapters and converters, but keeping the ability to register adapters/converters sounds like a very good idea to me. As you point out, Marc-Andre, they are application specific. Also, implementing converters and

[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-10-07 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- versions: +Python 3.11 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue26651> ___ ___ Python-bugs-list mailin

[issue45243] [sqlite3] add support for changing connection limits

2021-10-07 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +27123 pull_request: https://github.com/python/cpython/pull/28790 ___ Python tracker <https://bugs.python.org/issue45

[issue16379] SQLite error code not exposed to python

2021-10-07 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +27128 pull_request: https://github.com/python/cpython/pull/28809 ___ Python tracker <https://bugs.python.org/issue16

[issue26387] Crash calling sqlite3_close with invalid pointer

2021-10-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: FYI: We've been using sqlite3_close_v2(), when available, since 2017 (see 86a670543ff97d52fd9b8ca0477f8b6d27ee946d), but we now call it with GIL held. I'm leaning towards closing this as out-of-date. There is no reproducer, there has been no mo

[issue26387] Crash calling sqlite3_close with invalid pointer

2021-10-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: >From https://sqlite.org/c3ref/close.html: If sqlite3_close_v2() is called with unfinalized prepared statements, unclosed BLOB handlers, and/or unfinished sqlite3_backups, it returns SQLITE_OK regardless, but instead of deallocating the datab

[issue45512] [sqlite3] simplify "isolation level"

2021-10-18 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : While working on bpo-45126 / GH-28227 (and while working on the AC conversion, bpo-40956), I've been slightly frustrated on the implementation of sqlite3 "isolation level". The code is messy, and we've got two connection members tha

[issue45490] [meta][C API] Avoid C macro pitfalls and usage of static inline functions

2021-10-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: +1! See also bpo-43502 -- nosy: +erlendaasland ___ Python tracker <https://bugs.python.org/issue45490> ___ ___ Python-bug

[issue45490] [meta][C API] Avoid C macro pitfalls and usage of static inline functions

2021-10-18 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Previous discussion on Discourse: https://discuss.python.org/t/what-to-do-with-unsafe-macros/7771 -- ___ Python tracker <https://bugs.python.org/issue45

<    5   6   7   8   9   10   11   12   >