Closed
Description
So just enabled ResourceWarnings
to show up (these are only on PY3), see a sample run here; they are only enabled on the 3.5-dev build (you can manually enable by setting PANDAS_TESTING_MODE="deprecate"
These are unclosed filehandles mostly in the read_csv
tests.
So there are 2 cases here which need to be dealt with:
- when we uncompress things, we create a wrapper around the decompressor, these need to be closed, ONLY if the original handle was a string (IOW a pth), and NOT a filehandle itself (which we need to leave open)
- when we have a
utf-16
encoding we create aUTFReader
object which needs to be closed (but same as above, you can't close it if the original handle was open to begin with)
So I added some .close()
methods to the readers, but they are not explicity called anywhere. We need to figure out when to do this.
This might be a bit non-trivial!