Message239215
| Author |
martin.panter |
| Recipients |
Arfrever, martin.panter, nikratio, pitrou, serhiy.storchaka, wolma |
| Date |
2015年03月25日.02:43:43 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1427251423.55.0.504754280708.issue23529@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Wolfgang: If the patch here is too massive, perhaps you might like to review my patch at Issue 23528 first. :) It only fixes the "gzip" module, but is definitely simpler, so might have more chance of making it into 3.4 or 3.5 on time.
===
Changes introduced by patch v7 if anyone’s interested: <https://bitbucket.org/vadmium/cpython/commits/b7c43f7>. A few problems and behaviour changes are introduced:
* GzipFile(filename=...).close() now relies on the garbage collector to close the file
* EOFError("Compressed file ended before the end-of-stream marker was reached") repaced with "struct.error" exception in some cases, e.g. GzipFile(fileobj=BytesIO(gzip_data[:3])).read()
* Premature EOF when stream ends in some cases, e.g. GzipFile(fileobj=BytesIO(empty_gzip + gzip_data)).read()
However I think the general idea of inheriting the common reader class and overriding as necessary is sound. Just looks like the code got too messed around in the process. |
|