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 amaury.forgeotdarc
Recipients amaury.forgeotdarc, barry, cjwatson, eric.araujo, lars.gustaebel, python-dev, terry.reedy
Date 2012-05-08.18:16:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1336501001.4.0.790112333932.issue13815@psf.upfronthosting.co.za>
In-reply-to
Content
I think it would have been better to keep the ExFileObject class, and base it on io.BufferedReader:

class ExFileObject(io.BufferedReader):
    def __init__(self, tarfile, tarinfo):
        raw = _FileInFile(tarfile.fileobj,
                          tarinfo.offset_data,
                          tarinfo.size,
                          tarinfo.sparse)
        io.BufferedReader.__init__(self, raw)

The result is the same of course, but there is no need to special-case the pre-3.3 API.
In addition, _FileInFile could probably inherit from io.RawIOBase.
History
Date User Action Args
2012-05-08 18:16:41amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, barry, terry.reedy, lars.gustaebel, cjwatson, eric.araujo, python-dev
2012-05-08 18:16:41amaury.forgeotdarcsetmessageid: <1336501001.4.0.790112333932.issue13815@psf.upfronthosting.co.za>
2012-05-08 18:16:40amaury.forgeotdarclinkissue13815 messages
2012-05-08 18:16:40amaury.forgeotdarccreate