[issue1340] correction for test_tempfile in py3k on Windows
Guido van Rossum added the comment: New Revision: 58701. -- status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1340 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1340] correction for test_tempfile in py3k on Windows
Guido van Rossum added the comment: Committed revision 58699. (My own interpretation of the patch, with comment :-) I expect this will fix a bunch Windows failures; I've seen complaints inmplicating doubled newlines in a few places, and this mught just be the cause. Thanks! -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1340 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1340] correction for test_tempfile in py3k on Windows
Christian Heimes added the comment: Guido van Rossum wrote: Guido van Rossum added the comment: D'oh, I submitted to the wrong branch. The py3k branch will have to wait until after my son's birthday party. ;-) Have a nice party! How old is he? IIRC he was about 4 on the pictures you showed us at EuroPython 2005 in Göteborg. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1340 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1340] correction for test_tempfile in py3k on Windows
Christian Heimes added the comment: The patch is fine but you should add a short comment to avoid future trouble. On the first glance it's not obvious why the StringIO instance mustn't have a newline argument. -- nosy: +gvanrossum, tiran __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1340 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1340] correction for test_tempfile in py3k on Windows
New submission from Amaury Forgeot d'Arc: This tiny patch correct a failure in test_tempfile on Windows: in SpooledTemporaryFile, avoid translating the newlines twice. Otherwise, in universal text mode, \n gets transformed to \r\n, then to \r\r\n, which is read as \n\n. Passing the encoding is OK, since the round-trip gives the same result, and it allow encoding errors to occur at the right place. Index: Lib/tempfile.py === --- Lib/tempfile.py (revision 58680) +++ Lib/tempfile.py (working copy) @@ -495,7 +495,7 @@ if 'b' in mode: self._file = _io.BytesIO() else: -self._file = _io.StringIO(encoding=encoding, newline=newline) +self._file = _io.StringIO(encoding=encoding) self._max_size = max_size self._rolled = False self._TemporaryFileArgs = {'mode': mode, 'buffering': buffering, -- components: Windows messages: 56830 nosy: amaury.forgeotdarc severity: normal status: open title: correction for test_tempfile in py3k on Windows versions: Python 3.0 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1340 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com