Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.6 support: sqlite3.OperationalError: Safety level may not be changed inside a transaction #58

Closed
bit opened this issue Jan 7, 2017 · 7 comments
Assignees
Labels

Comments

@bit
Copy link
Contributor

bit commented Jan 7, 2017

fails in python3.6 with

Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File ".../site-packages/sqlitedict.py", line 371, in run
cursor.execute('PRAGMA synchronous=OFF')
sqlite3.OperationalError: Safety level may not be changed inside a transaction

bit added a commit to bit/sqlitedict that referenced this issue Jan 7, 2017
otherwise python 3.6 fails with
sqlite3.OperationalError: Safety level may not be changed inside a transaction
(fixes issue piskvorky#58)
@piskvorky piskvorky added the bug label Jan 8, 2017
@tmylk
Copy link
Contributor

tmylk commented Jan 8, 2017

How can this be reproduced? It doesn't come up in Travis Python 3.6 tests

@bit
Copy link
Contributor Author

bit commented Jan 8, 2017

creating a new instance with autocommit=False triggers this here:

test = SqliteDict(autocommit=False)

@bit
Copy link
Contributor Author

bit commented Jan 8, 2017

Looks like travis still does not fail.
Even without a new test, make test-all fails here on Arch Linux and Debian/unstable with python3.6 and sqlite 3.16.2

@tmylk
Copy link
Contributor

tmylk commented Jan 8, 2017

Let's check sqlite version used in Travis in #62

@tmylk
Copy link
Contributor

tmylk commented Jan 8, 2017

Hmm the sqlite version in travis is really old.

@bit
Copy link
Contributor Author

bit commented Jan 8, 2017

Also fails with Ubuntu 17.04 (sqlite 3.15.2).
Here a Dockerfile to test with Ubuntu 17.04, possibly something like that can be added to travis

@bit
Copy link
Contributor Author

bit commented Jan 8, 2017

Also fails in Ubuntu 16.10 (sqlite 3.14.1 / Python 3.6)

tmylk pushed a commit that referenced this issue Jan 8, 2017
…upport (#59)

otherwise python 3.6 fails with
sqlite3.OperationalError: Safety level may not be changed inside a transaction
(fixes issue #58)
bit added a commit to bit/sqlitedict that referenced this issue Jan 8, 2017
otherwise python 3.6 fails with
sqlite3.OperationalError: Safety level may not be changed inside a transaction
(fixes issue piskvorky#58)
@bit bit closed this as completed Jan 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants