Bug report
This code fails in Python 3.10 with the need to escape, but no escapechar set error:
import csv
value = 'my\x00string'
with io.StringIO() as buf:
writer = csv.writer(buf)
writer.writerow([value])
However, this worked on Python 3.9 and earlier, and it should work since I shouldn't have to specify an escapechar when quoting is available.
I believe this is caused by the fix for this issue: #56387
See this comment on how the C snippet added for the fix introduced this bug: #56387 (comment)
Bug report
This code fails in Python 3.10 with the
need to escape, but no escapechar seterror:However, this worked on Python 3.9 and earlier, and it should work since I shouldn't have to specify an
escapecharwhen quoting is available.I believe this is caused by the fix for this issue: #56387
See this comment on how the C snippet added for the fix introduced this bug: #56387 (comment)