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
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue45007>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
<
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
Change by Erlend E. Aasland :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue43398>
___
___
Python-bugs-list mailing list
Un
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
<
Change by Erlend E. Aasland :
--
status: pending -> open
Removed message: https://bugs.python.org/msg400334
___
Python tracker
<https://bugs.python.org/issu
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
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.
Change by Erlend E. Aasland :
--
resolution: fixed ->
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue44997>
___
___
Python-bugs-
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
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
Erlend E. Aasland added the comment:
Neat! Thanks :)
--
___
Python tracker
<https://bugs.python.org/issue44972>
___
___
Python-bugs-list mailing list
Unsub
Change by Erlend E. Aasland :
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/issue45025>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue34561>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
> Is something missing here?
No; all good. Thanks!
--
___
Python tracker
<https://bugs.python.org/issue43398>
___
___
Py
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
Change by Erlend E. Aasland :
--
pull_requests: +26518
pull_request: https://github.com/python/cpython/pull/28074
___
Python tracker
<https://bugs.python.org/issue45
Change by Erlend E. Aasland :
--
pull_requests: +26520
pull_request: https://github.com/python/cpython/pull/28076
___
Python tracker
<https://bugs.python.org/issue24
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
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
Change by Erlend E. Aasland :
--
pull_requests: +26531
pull_request: https://github.com/python/cpython/pull/28088
___
Python tracker
<https://bugs.python.org/issue44
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.
--
___
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
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
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
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(
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
Change by Erlend E. Aasland :
--
pull_requests: +26634
pull_request: https://github.com/python/cpython/pull/28209
___
Python tracker
<https://bugs.python.org/issue44
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
Erlend E. Aasland added the comment:
> It *would* be possible to improve the documentation, though.
+1
--
___
Python tracker
<https://bugs.python.org/issu
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
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
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
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
Erlend E. Aasland added the comment:
Great, thanks.
--
___
Python tracker
<https://bugs.python.org/issue45126>
___
___
Python-bugs-list mailing list
Unsub
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
Change by Erlend E. Aasland :
--
pull_requests: +26651
pull_request: https://github.com/python/cpython/pull/28231
___
Python tracker
<https://bugs.python.org/issue45
Change by Erlend E. Aasland :
--
pull_requests: +26654
pull_request: https://github.com/python/cpython/pull/28234
___
Python tracker
<https://bugs.python.org/issue45
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.
--
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
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
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
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
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
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
Change by Erlend E. Aasland :
--
pull_requests: +26661
pull_request: https://github.com/python/cpython/pull/28242
___
Python tracker
<https://bugs.python.org/issue42
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
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
Change by Erlend E. Aasland :
--
pull_requests: +26712
pull_request: https://github.com/python/cpython/pull/28298
___
Python tracker
<https://bugs.python.org/issue45
Change by Erlend E. Aasland :
--
pull_requests: +26713
pull_request: https://github.com/python/cpython/pull/28299
___
Python tracker
<https://bugs.python.org/issue5
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
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
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
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue45113>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue45116>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue43760>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Erlend E. Aasland :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Erlend E. Aasland :
--
pull_requests: +26886
pull_request: https://github.com/python/cpython/pull/28490
___
Python tracker
<https://bugs.python.org/issue44
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
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue45255>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Erlend E. Aasland :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue45255>
___
___
Python-bugs-list mailing list
Un
Change by Erlend E. Aasland :
--
pull_requests: +26906
pull_request: https://github.com/python/cpython/pull/28509
___
Python tracker
<https://bugs.python.org/issue45
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
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
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
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.
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
&
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
Change by Erlend E. Aasland :
--
pull_requests: +26956
pull_request: https://github.com/python/cpython/pull/28574
___
Python tracker
<https://bugs.python.org/issue44
Change by Erlend E. Aasland :
--
resolution: wont fix -> fixed
___
Python tracker
<https://bugs.python.org/issue45089>
___
___
Python-bugs-list mailing list
Un
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
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue29410>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue45374>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
Change by Erlend E. Aasland :
--
versions: +Python 3.11 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue26651>
___
___
Python-bugs-list mailin
Change by Erlend E. Aasland :
--
pull_requests: +27123
pull_request: https://github.com/python/cpython/pull/28790
___
Python tracker
<https://bugs.python.org/issue45
Change by Erlend E. Aasland :
--
pull_requests: +27128
pull_request: https://github.com/python/cpython/pull/28809
___
Python tracker
<https://bugs.python.org/issue16
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
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
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
Erlend E. Aasland added the comment:
+1!
See also bpo-43502
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue45490>
___
___
Python-bug
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
901 - 1000 of 1199 matches
Mail list logo