astropy/astropy — comment on commit 8de49c6020feda44a992ae5f824ec1e3d8e0fd0b
File:  line 0
By mdboom:

Two different issues, actually.

In 2.6, the GzipFile object lacks `__enter__` and `__exit__` for with statement support.

In 3.1, GzipFile can not be wrapped in an `io.TextIOWrapper` for encoding support.

I've added a comment to this effect. And it turns out we really need to include separate versions of gzip.py for Python 2.6 and 3.1 -- 2to3 doesn't fully do the right thing.