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.

Author bdkearns
Recipients bdkearns
Date 2014-08-24.20:35:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408912511.19.0.18672535508.issue22266@psf.upfronthosting.co.za>
In-reply-to
Content
tarfile.gzopen relies on refcounting to close the fileobj when the fileobj is created during the call to gzopen (when it is not passed in). Since the fileobj is created outside of GzipFile, GzipFile does not take responsibility for closing the fileobj (so no one does, aside from the GC, which leads to unexpected behavior when using a non-refcounted GC).

This is fixed by having GzipFile open the fileobj itself, so it does take responsibility for closing it when necessary. The same approach is taken in tarfile.py in py3k branch.
History
Date User Action Args
2014-08-24 20:35:11bdkearnssetrecipients: + bdkearns
2014-08-24 20:35:11bdkearnssetmessageid: <1408912511.19.0.18672535508.issue22266@psf.upfronthosting.co.za>
2014-08-24 20:35:11bdkearnslinkissue22266 messages
2014-08-24 20:35:11bdkearnscreate