Feature
Follow-up from #8254 (found by @doma17).
With QUOTE_MINIMAL and a custom lineterminator (not CR/LF), embedded \r/\n in a field are not quoted, so the output differs from CPython.
import csv, io
sio = io.StringIO()
csv.writer(sio, lineterminator="!").writerow(["\r", "\n"])
print(repr(sio.getvalue()))
# CPython: '"\r","\n"!'
# RustPython: '\r,\n!'
CPython always quotes fields containing \r/\n regardless of the lineterminator. (Not a regression from #8254 — same on develop.)
Python Documentation or reference to CPython source code
https://docs.python.org/3/library/csv.html#csv.QUOTE_MINIMAL
Feature
Follow-up from #8254 (found by @doma17).
With
QUOTE_MINIMALand a customlineterminator(not CR/LF), embedded\r/\nin a field are not quoted, so the output differs from CPython.CPython always quotes fields containing
\r/\nregardless of the lineterminator. (Not a regression from #8254 — same ondevelop.)Python Documentation or reference to CPython source code
https://docs.python.org/3/library/csv.html#csv.QUOTE_MINIMAL