When I try to use get_backend() function with a connection string which creates in-memory SQLite databases, I get errors. This is important for us since we use in-memory SQLite databases in our unit tests.
A minimal code to reproduce this is:
from yoyo import get_backend
connection_str = 'sqlite://'
get_backend(connection_str)
The error I get is:
Traceback (most recent call last):
File "<input>", line 3, in <module>
File "C:\Work\VirtualEnv\lib\site-packages\yoyo\connections.py", line 99, in get_backend
return backend_class(parsed, migration_table)
File "C:\Work\VirtualEnv\lib\site-packages\yoyo\backends.py", line 164, in __init__
self._connection = self.connect(dburi)
File "C:\Work\VirtualEnv\lib\site-packages\yoyo\backends.py", line 658, in connect
conn = self.driver.connect(
TypeError: expected str, bytes or os.PathLike object, not NoneType
Python: 3.8
yoyo-migrations: 7.3.1
Can you try against the latest version on sourcehut? I think https://hg.sr.ht/~olly/yoyo/rev/bf630e7d might fix this.
Yes, seems to be working. I had other errors, but they are probably related to a bug in my code.