Martin Panter added the comment:

I agree this is not a bug. It is just one of the unfortunate compatibility 
breaks between Py 2 and 3. Mode="rt" is not one of the values that are 
supported according to the documentation; adding support would be a new feature.

I understand the file mode handling is stricter on Windows because the 
underlying OS or C library would crash.

To have code that works with Py 2 and 3, I would switch the mode depending on 
the version of Python:

if sys.version_info >= (3,):
    handle = gzip.open(filename, "rt")
else:
    handle = gzip.open(filename)

----------
nosy: +martin.panter
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30012>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to