The old GeeZipFile class: https://github.com/internetarchive/warctools/blob/7f2b9a9/hanzo/warctools/stream.py#L183
depended on implementation details of gzip.py in the python standard library. It looks like python 3.5 breaks that class. Moreover, GeeZipFile doesn't work correctly for certain gzip members in any python version (can skip over some very small members, and there might be other issues). It turned out to be necessary to write a new class using zlib, rather than try to extend gzip.GzipFile.
These are changes I was working as part of the painful project of making CDX-Writer work with mainline surt and warctools libraries. That project isn't finished, but I think we might as well merge this change now.
The old GeeZipFile class: https://github.com/internetarchive/warctools/blob/7f2b9a9/hanzo/warctools/stream.py#L183 depended on implementation details of gzip.py in the python standard library. It looks like python 3.5 breaks that class. Moreover, GeeZipFile doesn't work correctly for certain gzip members in any python version (can skip over some very small members, and there might be other issues). It turned out to be necessary to write a new class using zlib, rather than try to extend gzip.GzipFile.
This pull request makes tests pass on python 3.5, see https://travis-ci.org/internetarchive/warctools/builds/157185857 vs https://travis-ci.org/internetarchive/warctools/builds/157138379
These are changes I was working as part of the painful project of making CDX-Writer work with mainline surt and warctools libraries. That project isn't finished, but I think we might as well merge this change now.