astrofrog/astropy — pull request #17 by mdboom (2012-11-06 21:01:49+00:00)
Title: Io/ascii compressed2

This fixes some remaining problems with #425.

The `close_fds` list is now hopefully correct and documented in purpose. We can't always close `fileobj`, so we dont... ;)

Also, this adds a reasonable workaround for the fact that a `BZ2File` can not be wrapped by a `TextIOWrapper`. It decompresses the file to a temporary file, and then reads that.

We may want to add a documentation note that `BZ2` files are bound to be inefficient in a number of ways (since they can't be read from a stream, and they can't be decoded in-place, it may need to create as many as 2 temporary files).