New issue 2872: Default isolation mode is different on pypy? https://bitbucket.org/pypy/pypy/issues/2872/default-isolation-mode-is-different-on
Ned Batchelder: multisql.py: ``` import sqlite3 import sys print(sys.version) print(sqlite3.sqlite_version) con = sqlite3.connect("the.db") with con: con.execute("pragma journal_mode=off") con.execute("create table foo (bar text)") con.execute("insert into foo (bar) values (?)", ("hello",)) con.execute("insert into foo (bar) values (?)", ("goodbye",)) con = sqlite3.connect("the.db") with con: print(list(con.execute("select * from foo"))) ``` Running it on CPython 3.6: ``` $ .tox/py36/bin/python /tmp/multisql.py 3.6.6 (default, Jun 28 2018, 07:43:54) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)] 3.19.3 [('hello',), ('goodbye',)] ``` Running it on PyPy 6.0.0: ``` $ .tox/pypy/bin/python /tmp/multisql.py 2.7.13 (ab0b9caf307d, Apr 24 2018, 18:05:02) [PyPy 6.0.0 with GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] 3.19.3 Traceback (most recent call last): File "/tmp/multisql.py", line 12, in <module> con.execute("insert into foo (bar) values (?)", ("goodbye",)) File "/usr/local/pythonz/pythons/PyPy-v6.0.0/lib_pypy/_sqlite3.py", line 487, in __exit__ self.commit() File "/usr/local/pythonz/pythons/PyPy-v6.0.0/lib_pypy/_sqlite3.py", line 456, in commit raise self._get_exception(ret) OperationalError: cannot commit transaction - SQL statements in progress ``` I can't find a difference detectable from the sqlite3 module that would explain the difference. _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue