[issue9759] GzipFile object should raise ValueError on .read() after .close()

Antoine Pitrou report at bugs.python.org
Wed Sep 15 10:27:10 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

You should make sure that all operations (except close() itself) raise ValueError. Currently:

>>> f = gzip.open("test.gz", "rb")
>>> f.close()
>>> f.read()
b''
>>> f.seek(0)
0

Also, you don't have to post a patch for 2.7. We'll do the porting ourselves.
Thanks for contributing!

----------
stage: needs patch -> patch review

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9759>
_______________________________________


More information about the Python-bugs-list mailing list