revision 1.33 of gzip.py
force gzip module to open files using 'b'inary mode.
closes patch #536278.
This looked like a bugfix candidate to me at some point...
def __init__(self, filename=None, mode=None,
compresslevel=9, fileobj=None):
+ # guarantee the file is opened in binary mode on platforms
+ # that care about that sort of thing
+ if mode and 'b' not in mode:
+ mode += 'b'
if fileobj is None:
fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
if filename is None: