[issue17895] TemporaryFile name returns an integer in python3

R. David Murray report at bugs.python.org
Fri May 3 19:30:45 CEST 2013


R. David Murray added the comment:

The 'name' attribute of TemporaryFile is not part of the API.  It happens to exist only because the underlying file object has a 'name' attribute.  On posix platforms the value is not really useful for anything.  In other words, that numpy code was buggy to start with, the bug was just hidden by the fact that in python2 name happened to be a string ('<fdopen>'), and nobody looked at the result.  What numpy was doing with it produced a nonsense value, but I guess nobody noticed.

Now, that said, I don't know why the value changed between Python2 and Python3, and that might conceivably be a bug of some sort.  I'm guessing it is a consequence of the IO system rewrite and is not a bug per-se, but it might also be that there are improvements that could be made here.

----------
nosy: +pitrou, r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17895>
_______________________________________


More information about the Python-bugs-list mailing list