[Python-Dev] 'text' mode rears its ugly head again

Bill Janssen janssen at parc.com
Mon Sep 17 01:01:29 CEST 2007


I've checked in the asyncore SSL patch, and the Windows buildbots are
failing on the HTTPS test.  I believe it's due to this insane
differentiation between between text files and binary files, a bad
idea introduced by Windows and perpetuated (apparently) by Python.  I
can't believe this wasn't eliminated in py3k!

Anyway, I think what's going on is that the two data blobs the test
compares, one read from a file opened with "open(filename, 'r')", and
the other a data stream read from an HTTP response "file" returned
from urllib.urlopen(), have different line-endings.  Of course, this
only matters on Windows; on UNIX, the faux differentiation doesn't
exist.

Bill



More information about the Python-Dev mailing list