python3.6.0 sqlite3 error
Imported issue: Initially reported by @thome in https://gforge.inria.fr/tracker/?group_id=2065&aid=21101
test_python_wudb fails on osx 10.11 with python3.6.
Here is an excerpt which causes the crash
#!/usr/bin/env python3
import sqlite3
db = sqlite3.Connection(':memory')
cursor = db.cursor()
cursor.execute(""BEGIN EXCLUSIVE"")
Or, since ""BEGIN EXCLUSIVE"" is more attached to the connection than to a cursor:
import sqlite3
db = sqlite3.Connection(':memory')
db.execute(""BEGIN EXCLUSIVE"")
Both fail as follows:
macintosh-907 ...s/cadofactor $ python3
Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type ""help"", ""copyright"", ""credits"" or ""license"" for more information.
import sqlite3
db = sqlite3.Connection(':memory')
db.execute(""BEGIN EXCLUSIVE"")
Traceback (most recent call last):
File """", line 1, in
sqlite3.OperationalError: cannot start a transaction within a transaction
^D
which is the exact same way our test_python_wudb test currently groans.
It does not matter whether the database is ':memory' or something else.
AFAICT, what we do is legit and shouldn't crash...