Summary
csv.writer(..., quoting=csv.QUOTE_NONE, quotechar=None, escapechar="\\") panics in RustPython.
Reproducer
import csv
import io
buf = io.StringIO()
csv.writer(
buf,
quoting=csv.QUOTE_NONE,
quotechar=None,
escapechar="\\",
).writerow(["a,b", 'x"y'])
print(repr(buf.getvalue()))
Expected
CPython writes:
The delimiter is escaped. The double quote is not special because quotechar=None.
Actual
RustPython reaches todo!() in crates/stdlib/src/csv.rs and panics.
Summary
csv.writer(..., quoting=csv.QUOTE_NONE, quotechar=None, escapechar="\\")panics in RustPython.Reproducer
Expected
CPython writes:
'a\\,b,x"y\r\n'The delimiter is escaped. The double quote is not special because
quotechar=None.Actual
RustPython reaches
todo!()incrates/stdlib/src/csv.rsand panics.