I've corrected some obvious issues, and we can fix others over time.
Mypy tests are currently broken, as adding the type hints has increased
mypy's testing surface.
another attempt at fixing 'database locked' errors on windows,
based on the suspicion that pysqlite is holding an open statement
handle that is preventing the switch from wal mode on close
also remove unused sync arg
To avoid all sorts of problems, we need to ensure cards scheduled with
the V2 scheduler are not studied in older clients. Unfortunately we
can't just bump the file's schema version, as the existing clients will
freely import files created with newer versions. This patch changes
that, so things should be a bit easier in the future.
In the mean time, we need a way to prevent older clients from importing
files created with the V2 scheduler. To do this, we switch to using a
'collection.anki21' file in the archive, and include a dummy collection
.anki2 file.
The code has been tested with both deck and collection packages, but
exporting deck packages w/ scheduling info will remain disabled until
the V2 scheduler has had more testing.
we need to switch to autocommit mode before executing vacuums &
certain pragmas
also removed the pysqlite version workaround; we just use the
python-provided versions in all cases now as it is new enough