eryksun added the comment:

This name attribute is documented here:

http://docs.python.org/3/library/io#io.FileIO.name

3.4 Source:

http://hg.python.org/cpython/file/04f714765c13/Modules/_io/fileio.c#l432

In PY2, os.fdopen sets the name to '<fdopen>'. See the related issue 13781. 
Here's the workaround in gzip.py:

    filename = getattr(fileobj, 'name', '')
    if not isinstance(filename, (str, bytes)):
        filename = ''

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21044>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to