[issue10515] csv sniffer does not recognize quotes at the end of line

2010-11-23 Thread Martin Budaj
New submission from Martin Budaj : The method Sniffer._guess_quote_and_delimiter() in the module csv.py contains a bug in a regexp which checks for quotes around the last item of the line (example: a,b,"c,d"\n). the pattern '(?P>[^\w\n"\'])(?P ?)(?P["\

[issue10515] csv sniffer does not recognize quotes at the end of line

2010-11-24 Thread Martin Budaj
Martin Budaj added the comment: Units test and two patches for 2.7 are included. p1.patch fixes testEnd case reported yesterday After running unittest it seems that also other case is broken (testAl -- if there is just one data item on the line, enclosed in quotes). Patch p2 fixes it, but

[issue10515] csv sniffer does not recognize quotes at the end of line

2010-12-04 Thread Martin Budaj
Martin Budaj added the comment: I'm not sure about what the intended behavior for testAl should be, however I think that the file should be recognized as having one column of data and no delimiter (there is a test for this case in csv.py) and not raise an exception. I attach patc

[issue10515] csv sniffer does not recognize quotes at the end of line

2010-12-14 Thread Martin Budaj
Martin Budaj added the comment: > What do you mean by "there is a test for this case in csv.py"? I meant test in regex on line 217 in python 2.7 and the following code (line 258ff): # there is *no* delimiter, it's a single column of quoted data delim = '' skipi