classification
Title: Fix for test_netrc on Windows
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: not a bug
Dependencies: Superseder: py3k: duplicated line endings when using read(1)
View: 1395
Assigned To: Nosy List: christian.heimes, gvanrossum
Priority: normal Keywords: patch

Created on 2007-10-27 21:45 by christian.heimes, last changed 2008-01-06 22:29 by admin. This issue is now closed.

Messages (3)
msg56863 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-10-27 21:45
Index: Lib/test/test_netrc.py
===================================================================
--- Lib/test/test_netrc.py      (revision 58695)
+++ Lib/test/test_netrc.py      (working copy)
@@ -25,7 +25,7 @@
         mode = 'w'
         if sys.platform not in ['cygwin']:
             mode += 't'
-        fp = open(temp_filename, mode)
+        fp = open(temp_filename, mode, newline='')
         fp.write(TEST_NETRC)
         fp.close()
msg56917 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-29 17:51
Are you sure this is the proper fix? Why does netrc.py insist on not
having \r\n line endings?  It opens the file in text mode so I don't
quite understand your patch.
msg56960 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-10-30 12:18
Guido van Rossum wrote:
> Are you sure this is the proper fix? Why does netrc.py insist on not
> having \r\n line endings?  It opens the file in text mode so I don't
> quite understand your patch.

I don't quite understand why it fails. :/ I've to take more time to
debug it.

Christian
History
Date User Action Args
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: Python 3.0
2007-11-06 02:18:37christian.heimessetstatus: open -> closed
resolution: not a bug
superseder: py3k: duplicated line endings when using read(1)
keywords: + py3k
2007-10-30 12:18:13christian.heimessetmessages: + msg56960
2007-10-29 17:51:50gvanrossumsetnosy: + gvanrossum
messages: + msg56917
2007-10-28 07:19:38loewissetkeywords: + patch
2007-10-27 21:45:48christian.heimescreate