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 vstinner
Recipients ezio.melotti, makegho, vstinner
Date 2012-12-03.07:23:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354519432.16.0.714317109686.issue16587@psf.upfronthosting.co.za>
In-reply-to
Content
_setmode(self->fd, O_BINARY) change was done in Python 3.2: see the issue #10841. This change introduced regressions:

 - #11272: "input() has trailing carriage return on windows", fixed in Python 3.2.1
 - #11395: "print(s) fails on Windows with long strings", fixed in Python 3.2.1
 - #13119: "Newline for print() is \n on Windows, and not \r\n as expected", fixed in Python 3.3 (and will be fixed in Python 3.2.4)

In Python 3.1, _setmode(self->fd, O_BINARY) was already used when Python is called with the -u command line option.

_setmode() supports different options:

 - _O_BINARY: no conversion
 - _O_TEXT: translate "\n" with "\r\n"
 - _O_U8TEXT: UTF-8 without BOM
 - _O_U16TEXT: UTF-16 without BOM
 - _O_WTEXT: UTF-16 with BOM

I didn't try wprintf(). This function is not used in the Python source code (except in the Windows launcher, which is not part of the main interpreter).

I don't know how to fix wprintf().
History
Date User Action Args
2012-12-03 07:23:52vstinnersetrecipients: + vstinner, ezio.melotti, makegho
2012-12-03 07:23:52vstinnersetmessageid: <1354519432.16.0.714317109686.issue16587@psf.upfronthosting.co.za>
2012-12-03 07:23:52vstinnerlinkissue16587 messages
2012-12-03 07:23:51vstinnercreate