New submission from Laurent Gautier: When creating a `gzip.GzipFile` using the named parameter `fileobj` rather than filename, iterating over it is broken: ``` AttributeError: 'GzipFile' object has no attribute 'extrastart' ```
The short example below is demonstrating the problem: ## --- import gzip, tempfile _data = (b'@WXOVW:25:85', b'ATACGCGGCT'+b'GATCGTAGCG', b'+', b'@@))CCCCBB'+b'???ECCEECC') data = gzip.zlib.compress(b'\n'.join(_data)) foo = tempfile.NamedTemporaryFile() foo.write(data) foo.flush() foo.seek(0) gzf = gzip.GzipFile(fileobj=foo) # this will trigger the AttributeError for x in gzf: print(x) ---------- components: Library (Lib) messages: 191989 nosy: Laurent.Gautier priority: normal severity: normal status: open title: 'GzipFile' object has no attribute 'extrastart' type: crash versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18323> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com