Message293111
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. |
|
| Date |
User |
Action |
Args |
| 2017-05-05 15:09:35 | Ondrej Kubecka | set | recipients:
+ Ondrej Kubecka |
| 2017-05-05 15:09:35 | Ondrej Kubecka | set | messageid: <1493996975.48.0.516954690623.issue30282@psf.upfronthosting.co.za> |
| 2017-05-05 15:09:35 | Ondrej Kubecka | link | issue30282 messages |
| 2017-05-05 15:09:35 | Ondrej Kubecka | create | |
|