This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients benjamin.peterson, jonash, josh.r, martin.panter, pitrou, stutzbach
Date 2016-05-13.11:36:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463139385.52.0.457602360849.issue24358@psf.upfronthosting.co.za>
In-reply-to
Content
Where would you draw the line though? At one extreme, BufferedWriter is a wrapper, but if you removed BufferedWriter.fileno() it would break all the code that does

with open(os.devnull, "wb") as null:
    proc = subprocess.Popen(..., stdout=null)

Would you remove it from HTTPResponse? Some HTTP responses can be chunked, so the child process would see the chunk headers using fileno(). But other HTTP responses are more direct and would work smoothly with the subprocess module.

Considering the compatibility problems and other possible uses of fileno(), I suspect removing it would be a bad idea. “Throwing the baby out with the bathwater” comes to mind. A less drastic change would be to require an explicit fileno() call and only passing the file descriptor to subprocess.

There is already a bug open for improving the documentation: Issue 19992
History
Date User Action Args
2016-05-13 11:36:25martin.pantersetrecipients: + martin.panter, pitrou, benjamin.peterson, stutzbach, jonash, josh.r
2016-05-13 11:36:25martin.pantersetmessageid: <1463139385.52.0.457602360849.issue24358@psf.upfronthosting.co.za>
2016-05-13 11:36:25martin.panterlinkissue24358 messages
2016-05-13 11:36:25martin.pantercreate