diff --git a/pylib/anki/collection.py b/pylib/anki/collection.py index 06442fe95..680b98434 100644 --- a/pylib/anki/collection.py +++ b/pylib/anki/collection.py @@ -256,7 +256,6 @@ crt=?, mod=?, scm=?, dty=?, usn=?, ls=?, conf=?""", self.save(trx=False) if not self.server: self.db.execute("pragma journal_mode = delete") - self.db.close() self.db = None self.backend = None self.media.close() diff --git a/pylib/anki/dbproxy.py b/pylib/anki/dbproxy.py index 5b6fa0bbf..a6ea0fec0 100644 --- a/pylib/anki/dbproxy.py +++ b/pylib/anki/dbproxy.py @@ -7,8 +7,6 @@ from typing import Any, Iterable, List, Optional, Sequence, Union import anki -# fixme: col.close()/col.reopen() & journal_mode=delete - # DBValue is actually Union[str, int, float, None], but if defined # that way, every call site needs to do a type check prior to using # the return values. @@ -27,10 +25,6 @@ class DBProxy: self._path = path self.mod = False - def close(self) -> None: - # fixme - pass - # Transactions ############### diff --git a/pylib/tests/shared.py b/pylib/tests/shared.py index 5294a84f0..df83eac73 100644 --- a/pylib/tests/shared.py +++ b/pylib/tests/shared.py @@ -22,7 +22,7 @@ def getEmptyCol(): os.close(fd) os.unlink(nam) col = aopen(nam) - col.db.close() + col.close() getEmptyCol.master = nam (fd, nam) = tempfile.mkstemp(suffix=".anki2") shutil.copy(getEmptyCol.master, nam)