This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: GzipFile's readinto() reads gzip data instead of file data.
Type: behavior Stage:
Components: IO Versions: Python 2.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Ryan Birmingham, r.david.murray
Priority: normal Keywords: patch

Created on 2016-06-18 07:15 by Ryan Birmingham, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
gzip_readinto.patch Ryan Birmingham, 2016-06-18 07:15
Messages (3)
msg268773 - (view) Author: Ryan Birmingham (Ryan Birmingham) Date: 2016-06-18 07:15
In cases where libraries try to call readinto(), the results are unexpected (the gzip data). Shouldn't it instead raise UnsupportedOperation for readinto() (and truncate())?
msg269073 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-06-22 13:28
Probably not in 2.7.  It may be broken, but what if someone is depending on it?  (Unlikely, but the chance of it outweighs the benefit of changing it in a mainteance release.)

Does the same problem exist in 3.6?  That's probably the only version where we would change it.
msg269078 - (view) Author: Ryan Birmingham (Ryan Birmingham) Date: 2016-06-22 16:49
It seems to work as expected in python 3.5 (and at least up, presumably). I'll close it. Thank you.
History
Date User Action Args
2022-04-11 14:58:32adminsetgithub: 71532
2016-06-22 16:49:27Ryan Birminghamsetstatus: open -> closed

messages: + msg269078
2016-06-22 13:28:59r.david.murraysetnosy: + r.david.murray
messages: + msg269073
2016-06-18 07:15:55Ryan Birminghamcreate