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 Ondrej Kubecka
Recipients Ondrej Kubecka
Date 2017-05-05.15:09:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493996975.48.0.516954690623.issue30282@psf.upfronthosting.co.za>
In-reply-to
Content
Consider the following code snippet:

<snip>
import tarfile

tar1 = tarfile.open('tar1.tar.gz')
file_ = tar1.extractfile('FILE')
print(file_.name)
</snip>

Up until 3.2.x, the value of name attribute would be 'FILE' as derived from tarinfo of the member. Starting with 3.3 (commits: b062a2fa 7a919e99) this value be obtained from tarfile.fileobj ("parent" tarball file) and would return 'tar1.tar.gz' instead.

This does not seem to be correct as it's not a filename of the ExFileObject / _FileInFile / io.BufferedReader object itself which would otherwise be consistent with values normally found under name.

There is also a problem that this information no longer appears to be accessible at all looking at the object returned from extractfile alone.

And looking at release notes of 3.3, this does not seem to be intentional effect.
History
Date User Action Args
2017-05-05 15:09:35Ondrej Kubeckasetrecipients: + Ondrej Kubecka
2017-05-05 15:09:35Ondrej Kubeckasetmessageid: <1493996975.48.0.516954690623.issue30282@psf.upfronthosting.co.za>
2017-05-05 15:09:35Ondrej Kubeckalinkissue30282 messages
2017-05-05 15:09:35Ondrej Kubeckacreate