From: Barry Warsaw Date: Mon, 7 Oct 2002 17:05:28 +0000 (+0000) Subject: openfile(): Go back to opening the files in text mode. This undoes X-Git-Tag: v2.2.2b1~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2972bdebcdd0079948fa0ee07a17e32a59f0d237;p=thirdparty%2FPython%2Fcpython.git openfile(): Go back to opening the files in text mode. This undoes the change in revision 1.11 (test_email.py) in response to SF bug #609988. We now think that was the wrong fix and that WinZip was the real culprit there. This and the Parser.py patch will be forward ported into Python 2.3 and email 2.5. --- diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 926c6bf5867d..5bbb79416b59 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -46,7 +46,7 @@ warnings.filterwarnings('ignore', '', DeprecationWarning, __name__) def openfile(filename): path = os.path.join(os.path.dirname(landmark), 'data', filename) - return open(path, 'rb') + return open(path, 'r') diff --git a/Lib/email/test/test_email_torture.py b/Lib/email/test/test_email_torture.py index 76d66a9ba71e..8d58b463b4cf 100644 --- a/Lib/email/test/test_email_torture.py +++ b/Lib/email/test/test_email_torture.py @@ -22,7 +22,7 @@ from email.Iterators import _structure def openfile(filename): from os.path import join, dirname, abspath path = abspath(join(dirname(testfile), os.pardir, 'moredata', filename)) - return open(path, 'rb') + return open(path, 'r') # Prevent this test from running in the Python distro try: