-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REGR: SpooledTemporaryFile support in read_csv #43447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hello @twoertwein! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-09-09 21:59:11 UTC |
Thanks @twoertwein. Is this targeting 1.3.x? |
It should be, I'll probably have time this evening to finish it up. I'm not yet sure whether try-except is a good solution here. Another option (maybe more for 1.4), would be to add a new keyword to read_csv to set the mode (to_csv has that currently). Then a user could overwrite the binary/text auto-detection by specifying |
Instead of using a try-except block, I added I'm not sure whether #43439 is a regression: yes, it worked previously, but it only worked because of inconsistencies between the c-engine and python-engine. This PR allows this inconsistency to continue (I'm not a fan of this). It is great that the c-engine is not only faster than the python-engine, but also doesn't seem to need the I would be slightly in favor of not fixing #43439 for 1.3.3 and instead adding a new keyword argument ("mode", same as in If it is preferred to fix #43439 for 1.3.3, I'm happy to make this happen (I think this PR should be ready). |
oh new commit way nicer |
very nice @twoertwein |
@meeseeksdev backport 1.3.x |
Something went wrong ... Please have a look at my logs. |
…43488) Co-authored-by: Torsten Wörtwein <[email protected]>
Probably should throw a warning, if we cannot wrap the handle with
io.TextIOWrapper
.To avoid the try-except, we could check whether the handle has the
readable
attribute, but there might be other attribute errors that might occur insideTextIOWrapper
.