URIFilename wraps a pointer passed in that is guaranteed valid for the lifetime of the sqlite3*. However the Python level object can outlive the connection (which may not even be an apsw owned one).
Accessing any of the methods on the URIFilename after the sqlite3* is closed results in use after free.
Either detect lifetime, or document not keeping it around like with the pragma wrapper.