Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Closed
Description
Bug report
Bug description:
mmap.mmap
has aseek()
method, but noseekable()
method. Because of this, it cannot be used an argument for ZipFile, which requires a file-like object with seekable. A small patch is enough to fix this
classSeekableMmap(mmap.mmap):defseekable(self):returnTrue
Now SeekableMmap can be passed to ZipFile without issue. It's easy to fix, but I can't think of any reasons why mmap shouldn't have a seekable method.
CPython versions tested on:
3.8, 3.11
Operating systems tested on:
Linux