[issue44677] CSV sniffing falsely detects space as a delimiter

2021-07-20 Thread Piotr Tokarski
Piotr Tokarski added the comment: I think changing `(?P["\']).*?(?P=quote)` to `(?P["\'])[^\n]*?(?P=quote)` in all regexes does the trick, doesn't it? -- ___ Python tracker <https:

[issue44677] CSV sniffing falsely detects space as a delimiter

2021-07-20 Thread Piotr Tokarski
Piotr Tokarski added the comment: Test sample: ``` import csv from io import StringIO def csv_text(): return StringIO("a|b\nc| 'd\ne|' f") with csv_text() as input_file: print('The following text is going to be parsed:') print(input_file.read(

[issue44677] CSV sniffing falsely detects space as a delimiter

2021-07-19 Thread Piotr Tokarski
New submission from Piotr Tokarski : Let's consider the following CSV content: "a|b\nc| 'd\ne|' f". The real delimiter in this case is '|' character while ' ' is sniffed. Find verbose example attached. Problem lays in csv.py file in the followin