[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: + newline is '' or '\n', no translation takes place. If newline is any\n Non-escaped \n. -- nosy: +storchaka status: closed - open ___ Python tracker rep...@bugs.python.org

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-16 Thread Georg Brandl
Georg Brandl added the comment: Would be nice to be a bit more specific *where* that line comes from. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would be nice to be a bit more specific *where* that line comes from. Modules/_io/textio.c, changesets 243ad1a6f638 and 083776adcacc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oops, I got the wrong issue, sorry. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: We should not convert \n with -u command line option or PYTHONUNBUFFERED was set. Why that? What do universal newlines have to do with buffering? -- ___ Python tracker rep...@bugs.python.org

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: I wonder why this is a release blocker. It's a bug in Python 3.2, so why should it block the release of 3.3 (it's not a regression). If no complete solution is coming up, I recommend to revert all changes on this issue, and reconsider after the 3.3 release.

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I wonder why this is a release blocker. It's a bug in Python 3.2, so why should it block the release of 3.3 (it's not a regression). It's a blocker because the fix broke a couple of tests. And it's also a regression from 3.1 and 2.7. --

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's a blocker because the fix broke a couple of tests. That cannot possibly be the explanation why haypo declared it a blocker on 2012-08-01; the fix was only applied on 2012-08-04. But I agree that it should block the release now; hence I propose to roll

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-05 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Antoine Pitrou added the comment: We should not convert \n with -u command line option or PYTHONUNBUFFERED was set. Why that? What do universal newlines have to do with buffering? Man page of Python says -u Force stdin, stdout and stderr to be

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Man page of Python says -u Force stdin, stdout and stderr to be totally unbuffered. On systems where it matters, also put stdin, stdout and stderr in binary mode. I don't know which version it is, but current 3.3 says: “Force the

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset bc4fdb758b8c by Antoine Pitrou in branch '3.2': Fix CGI tests to take into account the platform's line ending (issue #13119) http://hg.python.org/cpython/rev/bc4fdb758b8c New changeset ee185c6b2880 by Antoine Pitrou in branch 'default': Fix CGI

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-05 Thread STINNER Victor
STINNER Victor added the comment: Buildbots are happy, the issue can be closed again. Thanks Antoine. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-05 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: I don't know which version it is, but current 3.3 says: Ah, sorry, I thought I was reading latest Man page. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Windows buildbots now show failures in the test suite. -- status: closed - open versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4efad7fba42a by Antoine Pitrou in branch '3.2': Fix test_sys under Windows (issue #13119) http://hg.python.org/cpython/rev/4efad7fba42a New changeset e4a87f0253e9 by Antoine Pitrou in branch 'default': Merge universal newlines-related fixes (issue

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8e435d6a801 by Antoine Pitrou in branch 'default': Fix test_venv to work with universal newlines (issue #13119) http://hg.python.org/cpython/rev/f8e435d6a801 -- ___ Python tracker rep...@bugs.python.org

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: test_httpservers still fails, it's the CGI tests... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Fix for test_httpservers -- Added file: http://bugs.python.org/file26694/issue13119_httpserver.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Sorry, please ignore the patch 'issue13119_httpserver.patch' I posted above. Behavior of -u commandline option in Python3.3 is differ than in Python 2. We should not convert newline characters if -u specified? I'll investigate more. --

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-04 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: We should not convert \n with -u command line option or PYTHONUNBUFFERED was set. Added a patch to fix error in test_httpservers. -- Added file: http://bugs.python.org/file26695/issue13119_unbuffered.patch ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset c55dbb84f3b4 by Victor Stinner in branch 'default': Close #13119: use \r\n newline for sys.stdout/err on Windows http://hg.python.org/cpython/rev/c55dbb84f3b4 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status:

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 09408b990ca5 by Victor Stinner in branch '3.2': Close #13119: use \r\n newline for sys.stdout/err on Windows http://hg.python.org/cpython/rev/09408b990ca5 -- ___ Python tracker rep...@bugs.python.org

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-02 Thread STINNER Victor
STINNER Victor added the comment: I wonder why print(1, file=sys.stderr) returns '1' instead of '1\n'. I suppose that you mean returns '1\n' instead of '1'. This is a major change between Python 2 and Python 3. Use print(1, end=' ') if you want the same behaviour. See:

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-02 Thread STINNER Victor
STINNER Victor added the comment: It would be nice to fix this before Python 3.3 final. @Georg: So, what do you think? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: About the patch: why wouldn't you use newline = NULL in both cases? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-02 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: On Fri, Aug 3, 2012 at 5:16 AM, STINNER Victor rep...@bugs.python.org wrote: I wonder why print(1, file=sys.stderr) returns '1' instead of '1\n'. I suppose that you mean returns '1\n' instead of '1'. No, sorry for my lame wording. In the test I submitted,

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-01 Thread STINNER Victor
STINNER Victor added the comment: On Windows, stdin, stdout and stderr are creates using TextIOWrapper(..., newline=None). In this case, TextIOWrapper._writenl is os.linesep and so '\r\n'. Oh, I was wrong: stdin is created with newline=None, but stdout and stderr are created with

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-08-01 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Test for this issue. Tested on Windows7, Ubuntu linux 12.04. I wonder why print(1, file=sys.stderr) returns '1' instead of '1\n'. But in Python2.7, print sys.stderr, 1 also returns '1', so this might not be a problem. -- Added file:

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2012-07-31 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: I found 'more' command in Windows7 requires \r\n. Python 2.7.3: C:\python -c for i in range(5):print(i)|more 0 1 2 3 4 Python 3.3(trunk): c:\src\cpython\PCbuildpython -c for i in range(5):print(i)|more ? -- nosy: +ishimoto

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-10 Thread M. Zilmer
M. Zilmer mzdkm...@gmail.com added the comment: Just to make it clear: I have not observed any problems on the Windows terminal (cmd) with \n newline, but at least Notepad does not break lines correctly if only \n is used. -- ___ Python tracker

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-09 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___ ___ Python-bugs-list

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I changed how newlines are handled on Windows to fix an issue with CGI: see the issue #10841. changeset: 67431:0933c3753a71 user:Victor Stinner victor.stin...@haypocalc.com date:Fri Jan 07 18:47:22 2011 +

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-07 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: print() uses PyFile_WriteString(\n, file) by default (if the end argument is not set) to write the newline. TextIOWrapper.write(\n) replaces \n by TextIOWrapper._writenl. On Windows, stdin, stdout and stderr are creates using

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-07 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: If the output is redirected (e.g. into a file), TextIOWrapper is created with line_buffering=False. How does this affect the \r\n translation? -- ___ Python tracker rep...@bugs.python.org

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-06 Thread M. Zilmer
New submission from M. Zilmer mzdkm...@gmail.com: In 3.2.2 the newline for print() is \n on Windows, and not \r\n as expected. In 3.1.4 the newline is \r\n. OS is Win 7, and tried on both 32 and 64 bit. Small example with output is attached. -- components: Windows files: newline.py

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-06 Thread M. Zilmer
Changes by M. Zilmer mzdkm...@gmail.com: Added file: http://bugs.python.org/file23331/newline_3.1.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-06 Thread M. Zilmer
Changes by M. Zilmer mzdkm...@gmail.com: Added file: http://bugs.python.org/file23332/newline_3.2.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13119 ___

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: To people who open the file in their browser: text files are very similar, but newline_3.1.txt has CRLF line endings and newline_3.2.txt has LF line endings. M.Z, how did you obtain them? did you start a subprocess? -- nosy:

[issue13119] Newline for print() is \n on Windows, and not \r\n as expected

2011-10-06 Thread M. Zilmer
M. Zilmer mzdkm...@gmail.com added the comment: Hi Amaury, The two text files were obtained through redirection in Windows, so I simply ran the newline.py file with: ... C:\Python31\python.exe newline.py newline_3.1.txt ... C:\Python32\python.exe newline.py newline_3.2.txt Best