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 BreamoreBoy, asvetlov, chris.jerdonek, georg.brandl, gregory.p.smith, martin.panter, pitrou, r.david.murray
Date 2016-06-12.07:54:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Summary: There was originally a bug, but it has been fixed. At best, we leave this open to work on including Andrew’s patch.

Andrew’s patch adds a modified copy of test_universal_newlines_communicate_stdin(). But it does not look correct, and would fail on Windows. It needs to avoid decoding newlines in the child, like in revision 150fa296f5b9. IMO the existing test_universal_newlines_communicate_stdin() test should also be adjusted to verify that os.linesep was sent to the child process.

Also, I don’t understand the SETBINARY business. Aren’t stdin etc set to binary mode by default in Python 3? Yes, it would be required for Python 2 compatibility, but if this patch is only for Python 3, why do we need it?

Anyway, Antoine opened this bug specifically about the “select- and poll-based” implementation (now based on the new selectors module). That implementation is only used with multiple pipes. So I don’t see how the patch is relevant to the original issue (although it may be worthwhile updating and adding anyway).

Regarding Antoine’s original report, we now do encode text strings to bytes. This was fixed as a side effect of revision c4a0fa6e687c in 3.3 (added timeout=... parameter), and directly in 3.2 by Issue 16903.

As for newline translation, I’m not sure if that is really relevant. The selectors implementation is only used if sys.platform != "win32", while os.linesep translation only needs to happen when 'posix' not in sys.builtin_module_names. I suspect in all cases where the selectors implementation is used, and os.linesep is "\n", so it is not actually a bug.
Date User Action Args
2016-06-12 07:54:21martin.pantersetrecipients: + martin.panter, georg.brandl, gregory.p.smith, pitrou, r.david.murray, asvetlov, chris.jerdonek, BreamoreBoy
2016-06-12 07:54:21martin.pantersetmessageid: <>
2016-06-12 07:54:21martin.panterlinkissue12623 messages
2016-06-12 07:54:21martin.pantercreate