Title: zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.8, Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: dhillier
Priority: normal Keywords: patch

Created on 2019-07-09 07:06 by dhillier, last changed 2019-07-09 07:27 by dhillier.

Pull Requests
URL Status Linked Edit
PR 14658 open dhillier, 2019-07-09 07:27
Messages (1)
msg347524 - (view) Author: Daniel Hillier (dhillier) * Date: 2019-07-09 07:06
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
Date User Action Args
2019-07-09 07:27:20dhilliersetkeywords: + patch
stage: patch review
pull_requests: + pull_request14465
2019-07-09 07:06:51dhilliercreate