-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
sqlite3 is built into python, but I'm getting a interesting issue. Unsure if it's alpine-linux or what:
docker run -i -t python:3.5.1-alpine /bin/sh
python
import sqlite3
conn = sqlite3.connect(":memory:")
sqlite3.sqlite_version
sqlite3.version
sqlite3.__file__
conn.enable_load_extension(True)
useful output:
>>> sqlite3.sqlite_version
'3.9.2'
>>> sqlite3.version
'2.6.0'
>>> conn.enable_load_extension(True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'sqlite3.Connection' object has no attribute 'enable_load_extension'
Trying to track down the error leads mostly to issues with 2x python. the enable_load_extension wasn't available until 2.7. It should however be in 3.5.
this is the expected behavior:
>>> import sqlite3
>>> conn = sqlite3.connect(":memory:")
>>> sqlite3.sqlite_version
'3.11.0'
>>> sqlite3.version
'2.6.0'
>>> sqlite3.__file__
'/usr/lib/python3.5/sqlite3/__init__.py'
>>> conn.enable_load_extension(True)
Metadata
Metadata
Assignees
Labels
No labels