You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Revert "BUG: Revert gh-16039 (#16663)"
This reverts commit c550372.
* always treat files as binary to cope with windows and EOF.
on windows, EOF can appear "in band" if the file is considered text. when
moving from fread() to read(), i lost the "b" part of the mode. at the
time i believed this was a nop, since unix doesnt treat files differently
based on that flag.
this adds O_BINARY to the flags to open to restore the behaviour lost
when taking "b" away from fopen. if a platform doesn't provide O_BINARY,
this defines it to 0 so it can still be used without effect later on in
the code.
* dont leak the fd in new_file_source() if buffer allocation fails.
* reapply the test for EOF in the middle of a stream.
part of c550372
* pass rb to _get_handle on python 3, otherwise stick to r.
part of c550372
* replace goto with inline unwinding of state.
requested by @jreback in #16675 feedback.
* describe the fixes to the read_csv() backend and issue numbers.
requested by @jreback in feedback on #16675
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.20.3.txt
+1-2
Original file line number
Diff line number
Diff line change
@@ -55,8 +55,7 @@ Indexing
55
55
I/O
56
56
^^^
57
57
58
-
- Bug in ``pd.read_csv()`` in which files containing EOF characters mid-field could fail with the C engine on Windows (:issue:`16039`, :issue:`16559`)
59
-
58
+
-- Bug in ``pd.read_csv()`` in which files weren't opened as binary files by the C engine on Windows, causing EOF characters mid-field, which would fail (:issue:`16039`, :issue:`16559`, :issue`16675`)
0 commit comments