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

2010-10-07 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Patch committed in r85291 (3.x), and backported to 3.1 (r85293) and 2.7 (r85292). Thank you! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker

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

2010-09-15 Thread Antoine Pitrou
Antoine Pitrou pit...@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

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

2010-09-15 Thread Jeffrey Finkelstein
Jeffrey Finkelstein jeffrey.finkelst...@gmail.com added the comment: Here's the updated patch, which checks whether the file is closed on each call to read(), write(), and flush(), along with a test. -- Added file: http://bugs.python.org/file18893/issue9759.patch

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

2010-09-12 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9759 ___ ___

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

2010-09-11 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Should this be fixed in 3.1 and 2.7 too? -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9759 ___

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

2010-09-07 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- keywords: +easy nosy: +pitrou versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9759 ___

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

2010-09-03 Thread Alain Kalker
New submission from Alain Kalker m...@dds.nl: f = open(test2.gz) d = f.read() f.close() e = f.read() Traceback (most recent call last): File stdin, line 1, in module ValueError: I/O operation on closed file import gzip f = gzip.open(test2.gz) d = f.read() f.close() e = f.read() e ''

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

2010-09-03 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9759 ___ ___