Change by Erlend E. Aasland :
--
nosy: +corona10
___
Python tracker
<https://bugs.python.org/issue22956>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Change by Erlend E. Aasland :
--
keywords: +patch
Added file: https://bugs.python.org/file50029/patch.diff
___
Python tracker
<https://bugs.python.org/issue44
Erlend E. Aasland added the comment:
Attached patch includes the test case from bpo-33376.
--
___
Python tracker
<https://bugs.python.org/issue44092>
___
___
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
Change by Erlend E. Aasland :
--
Removed message: https://bugs.python.org/msg393386
___
Python tracker
<https://bugs.python.org/issue43350>
___
___
Python-bug
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
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
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
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
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
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
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
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
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
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
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:
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
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
Erlend E. Aasland added the comment:
Ditto for Doc/includes/sqlite3/insert_more_people.py
--
___
Python tracker
<https://bugs.python.org/issue44106>
___
___
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
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
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
Change by Erlend E. Aasland :
--
pull_requests: +24693
pull_request: https://github.com/python/cpython/pull/26053
___
Python tracker
<https://bugs.python.org/issue28
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
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
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
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
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
Erlend E. Aasland added the comment:
Sure, I’ll do it after dinner :)
--
___
Python tracker
<https://bugs.python.org/issue44116>
___
___
Python-bugs-list mailin
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
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
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
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
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
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
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
Change by Erlend E. Aasland :
--
pull_requests: +24746
pull_request: https://github.com/python/cpython/pull/26104
___
Python tracker
<https://bugs.python.org/issue42
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
*
Change by Erlend E. Aasland :
--
pull_requests: +24759
pull_request: https://github.com/python/cpython/pull/26114
___
Python tracker
<https://bugs.python.org/issue42
Change by Erlend E. Aasland :
--
pull_requests: -23226
___
Python tracker
<https://bugs.python.org/issue42972>
___
___
Python-bugs-list mailing list
Unsub
Change by Erlend E. Aasland :
--
pull_requests: +24767
pull_request: https://github.com/python/cpython/pull/26128
___
Python tracker
<https://bugs.python.org/issue44
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
Change by Erlend E. Aasland :
--
versions: +Python 3.11 -Python 3.10
___
Python tracker
<https://bugs.python.org/issue42862>
___
___
Python-bugs-list mailin
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue38768>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
Change by Erlend E. Aasland :
--
pull_requests: +24851
pull_request: https://github.com/python/cpython/pull/26234
___
Python tracker
<https://bugs.python.org/issue44
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
Change by Erlend E. Aasland :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
Change by Erlend E. Aasland :
Removed file: https://bugs.python.org/file50029/patch.diff
___
Python tracker
<https://bugs.python.org/issue44092>
___
___
Python-bug
Change by Erlend E. Aasland :
--
Removed message: https://bugs.python.org/msg393367
___
Python tracker
<https://bugs.python.org/issue44092>
___
___
Python-bug
Change by Erlend E. Aasland :
--
Removed message: https://bugs.python.org/msg393339
___
Python tracker
<https://bugs.python.org/issue44092>
___
___
Python-bug
Erlend E. Aasland added the comment:
The effect of PR 26026 is that InterfaceError is no longer raised for fetch
across rollback; instead it is up to SQLite how to handle this:
- for some cases, SQLITE_ABORT or SQLITE_ABORT_ROLLBACK may be returned, which
will result in an OperationalError
Erlend E. Aasland added the comment:
I've crafted a number of rollback tests, but it occurred to me that they are
simply just testing SQLite behaviour; not sqlite3 behaviour. I had to adjust
the tests according to which version of SQLite was used (for example 3.8.7.2
introduce
Erlend E. Aasland added the comment:
I'm unable to reproduce this on 3.8 though 3.11a0. It's unclear to me if this
even was an issue. (I have no ancient Python versions to test with.)
Closing as out-of-date in a day or two, unless someone disagrees.
--
nosy: +erlendaasl
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue9924>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
Regarding the maximum length of an SQL string, quoting from
https://sqlite.org/limits.html:
"The current implementation will only support a string or BLOB length up to
2^31-1 or 2147483647. And some built-in functions such as hex() might fail well
b
Erlend E. Aasland added the comment:
Regarding the maximum length of an SQL string, quoting from
https://sqlite.org/limits.html:
"The current implementation will only support a string or BLOB length up to
2^31-1 or 2147483647. And some built-in functions such as hex() might fail well
b
Change by Erlend E. Aasland :
--
Removed message: https://bugs.python.org/msg393977
___
Python tracker
<https://bugs.python.org/issue44165>
___
___
Python-bug
Erlend E. Aasland added the comment:
SQLITE_TOOBIG is currently mapped to sqlite3.DataError. In order to keep the
current behaviour, DataError must be raised.
--
___
Python tracker
<https://bugs.python.org/issue44
Erlend E. Aasland added the comment:
See also bpo-42376
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue44099>
___
___
Python-bug
Erlend E. Aasland added the comment:
How will you differentiate which types should be added to the module dict and
which not to add. How will you map the instantiated type objects to the
respective module state members?
--
___
Python tracker
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue44184>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
FWIW, I'm also unable to reproduce on macOS (so far).
--
___
Python tracker
<https://bugs.python.org/issue44184>
___
___
Erlend E. Aasland added the comment:
> Crash related to AST in interpreter_clear() remains me bpo-41796.
Well remembered, Victor!
Bisecting using Pablo's reproducer:
fd957c124c1d9c5eaf61f7af8cf266bafcb1 is the first bad commit
commit fd957c124c1d9c5eaf61f7af8cf266bafcb
Erlend E. Aasland added the comment:
Using Pablo's (or Victor's) reproducer from bpo-44184, I'm getting a crash,
apparently because _PyThreadState_PushLocals() is called after
PyThreadState_Clear().
In Python/pystate.c interpreter_clear(), we're first calling
PyThrea
Erlend E. Aasland added the comment:
cc. Pablo, Victor
--
nosy: +pablogsal, vstinner
___
Python tracker
<https://bugs.python.org/issue44032>
___
___
Python-bug
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue44203>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
FYI, the pending release log of the upcoming SQLite 3.36.0 now mentions that
these API's are enabled by default:
https://sqlite.org/releaselog/3_36_0.html
--
___
Python tracker
<https://bugs.py
Change by Erlend E. Aasland :
--
nosy: +berker.peksag
versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue30
Change by Erlend E. Aasland :
--
keywords: +patch
nosy: +erlendaasland
nosy_count: 9.0 -> 10.0
pull_requests: +24908
pull_request: https://github.com/python/cpython/pull/26309
___
Python tracker
<https://bugs.python.org/issu
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue44112>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Erlend E. Aasland :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue30757>
___
___
Python-bugs-list mailing list
Un
Erlend E. Aasland added the comment:
Closing as not-a-bug. Feel free to reopen if we've missed anything.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue40068>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
> The smiley emoji 😀 is U+1F600 which is outside of the Unicode Basic
> Multilingual Plane (BMP).
Correct, and this is documented:
https://docs.python.org/3/library/idle.html#user-output-in-shell
Suggesting to close this as not-a-bug.
-
Change by Erlend E. Aasland :
--
status: pending -> open
title: [IDLE] Weird behaviour in IDLE while dealing with non-ASCII characters
-> [IDLE] Weird behaviour in IDLE when printing non-BMP unicode characters
___
Python tracker
Change by Erlend E. Aasland :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue44217>
___
___
Python-bugs-list mailing list
Un
Erlend E. Aasland added the comment:
> What about closing this as third party? (Tcl/Tk is a dependency but still
> it's a third party right?)
Sure. I'll leave that for Terry or any of the other IDLE devs. We can adjust
the resolution after close if needed.
> Also what&
Erlend E. Aasland added the comment:
STM like the most reasonable thing to do is to enhance the docs, as Terry
suggested.
--
___
Python tracker
<https://bugs.python.org/issue44
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue44206>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Erlend E. Aasland :
--
nosy: +erlendaasland
___
Python tracker
<https://bugs.python.org/issue44207>
___
___
Python-bugs-list mailing list
Unsubscribe:
Erlend E. Aasland added the comment:
Ronald, do you still wish to apply this? It should be easy to rebase this patch
onto main.
If not, we should perhaps close this issue.
--
nosy: +erlendaasland
versions: +Python 3.11 -Python 3.4
___
Python
201 - 300 of 829 matches
Mail list logo