Skip to content

Conversation

twoertwein
Copy link
Member

@twoertwein twoertwein commented Jan 15, 2022

Open file handles in TextFileParser instead of in the read_csv engines. This makes it easier to close file handles in case of an error.

It is probably better to merge #45388 (for 1.4.x) and then this PR for 1.5.

@twoertwein twoertwein added the IO CSV read_csv, to_csv label Jan 15, 2022
@jreback
Copy link
Contributor

jreback commented Jan 16, 2022

@twoertwein

It is probably better to merge #45388 (for 1.4.x) and then this PR for 1.5.

can we merge this to 1.4? i think its pretty comprehensive

@jreback jreback added this to the 1.4 milestone Jan 16, 2022
@twoertwein
Copy link
Member Author

Yes, can go in 1.4.0 Just wasn't sure whether there will be enough time for this.

@jreback jreback merged commit 6cc5584 into pandas-dev:main Jan 16, 2022
@jreback
Copy link
Contributor

jreback commented Jan 16, 2022

thanks @twoertwein

@jreback
Copy link
Contributor

jreback commented Jan 16, 2022

@meeseeksdev backport 1.4.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jan 16, 2022

Something went wrong ... Please have a look at my logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: read_csv can leak file handles if validation fails
2 participants