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
{{ message }}
Repository navigation
CSV input streams remain open after parsing errors #950
CSV iterators from rows_from_file() close their input stream on normal exhaustion but leave it open when parsing fails. Holding the iterator after a failed import retains the TextIOWrapper and input descriptor.
This prints False. The iterator cannot produce further rows after its generator raises RowError, so it should release the stream just as it does at end-of-input. Invalid UTF-8 input similarly leaves the file open after UnicodeDecodeError.
Reproduced on current main with CPython 3.14.6. Two tests using real files fail because the descriptor remains open after the expected parsing exception. _CloseableIterator.__next__() only closes the owned text wrapper when it catches StopIteration.
Activity