[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-09 Thread Raphael Gaschignard
Raphael Gaschignard added the comment: that error is what is raised by StringIO (subclassing OSError), other file-like objects could just be raising OSError (according to the file object spec described in the documentation for the io module). Fixing documentation would already be helpful

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-09 Thread Raphael Gaschignard
Raphael Gaschignard added the comment: I'm sorry for the confusion here, it turns out I was misinterpreting the results of my program and my workaround was not working. Like others have said, the subprocess code seems to rely on the existence of file descriptors I would be pretty partial

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-06 Thread Raphael Gaschignard
Raphael Gaschignard added the comment: the subprocess module has code to handle file objects that don't use file descriptors. It's not that file descriptors are necessary for the parameter, but that the way POpen is trying to detect "no file descriptor support" is through "fi

[issue29989] subprocess.Popen does not handle file-like objects without file descriptors

2017-04-04 Thread Raphael Gaschignard
New submission from Raphael Gaschignard: >From the documentation of the io module: fileno() Return the underlying file descriptor (an integer) of the stream if it exists. An OSError is raised if the IO object does not use a file descriptor. However, when passing a file-like object with