What has been tested:
- Still works when not bundled in a .jar, does not use StringIO wrapper.
- Works and uses StringIO wrapper when patched so that the
is_seekablecheck always fails.
What has not (yet) been tested:
- Does it actually work with a
uri:classloaderresource in a bundled .jar, with
- Does it work with a non-seekable DB file in other cases, where
seekmight raise an exception?
While I’m 99% confident that the answer to both questions is yes, I’d still like to do a bit more testing. But I wanted to get this PR out for review before the weekend.
(Also, I’m not sure if there are any potential newline and/or UTF-8 conversion issues on some platforms that might require opening the DB files explicitly in binary mode. If there were, I suspect the existing code would already be buggy on such platforms, since it’s already seeking around in a file opened in text mode, but I’m still slightly worried and would like to see this tested better.)