general: deprecate my.core.dataset and simplify tox file
This commit is contained in:
parent
65dbdc44ef
commit
420e8b23f2
4 changed files with 16 additions and 34 deletions
12
my/core/_deprecated/dataset.py
Normal file
12
my/core/_deprecated/dataset.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
from ..common import PathIsh
|
||||
from ..sqlite import sqlite_connect_immutable
|
||||
|
||||
|
||||
def connect_readonly(db: PathIsh):
|
||||
import dataset # type: ignore
|
||||
|
||||
# see https://github.com/pudo/dataset/issues/136#issuecomment-128693122
|
||||
# todo not sure if mode=ro has any benefit, but it doesn't work on read-only filesystems
|
||||
# maybe it should autodetect readonly filesystems and apply this? not sure
|
||||
creator = lambda: sqlite_connect_immutable(db)
|
||||
return dataset.connect('sqlite:///', engine_kwargs={'creator': creator})
|
Loading…
Add table
Add a link
Reference in a new issue