[Python-Dev] raising a io exception when fileno is requested on a tarfile FileInFile

2021-10-29 Thread Stephen J. Turnbull
makap...@gmail.com writes: > When you call extractfile() on a TarFile, the result is a buffered > version of a _FileInFile pseudo-file. When fileno() is called on > this resulting file, fileno() it not exist (understandably) and an > AttributeError is raised. I would like to suggest raising

[Python-Dev] raising a io exception when fileno is requested on a tarfile FileInFile

2021-10-29 Thread makapuf2
Hi, When you call extractfile() on a TarFile, the result is a buffered version of a _FileInFile pseudo-file. When fileno() is called on this resulting file, fileno() it not exist (understandably) and an AttributeError is raised. I would like to suggest raising an io.UnsupportedOperation