[issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile

Daniel Hillier report at bugs.python.org
Tue Jul 9 03:06:51 EDT 2019


New submission from Daniel Hillier <daniel.hillier at gmail.com>:

After closing a file object opened from a ZipFile, attempting i/o operations raises AttributeError because the underlying fd has been set to None. We should be raising ValueErrors consistent with io.FileIO behaviour.

Similar inconsistencies exist for the following operations on a closed ZipExtFile:
- seek
- seekable
- read
- readable
- tell

----------
components: Library (Lib)
messages: 347524
nosy: dhillier
priority: normal
severity: normal
status: open
title: zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile
type: behavior
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37523>
_______________________________________


More information about the Python-bugs-list mailing list