-
Notifications
You must be signed in to change notification settings - Fork 102
Description
I'm attempting to create a custom VFS in python. I'm using Python 3.8.5, and apsw-3.35.4-r1 built from a zip file on Ubuntu 20.04.2 using the "recommended instructions" from the documentation.
I'm not able to get WAL-mode to work if I return a subclass of apsw.VFSFile from my xOpen method. I've tried both this minimal example as well as the example obfuscating VFS. In both cases I can use the custom VFS, but attempts to set pragma journal_mode=wal are no-ops, and the VFS will refuse to open an existing database that's already in WAL mode.
The linked test creates a fresh database, executes pragma journal_mode=wal and then asserts that the return value is wal. The first test, which works, uses the default VFS. The second test, which also works, uses a custom VFS with a custom xOpen but returns an instance of apsw.VFSFile. The third test returns a subclass of apsw.VFSFile from its xOpen, and it is this configuration that fails.