[issue30825] csv.Sniffer does not detect lineterminator

2020-02-03 Thread Max Vorobev
Change by Max Vorobev : -- keywords: +patch pull_requests: +17708 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/18336 ___ Python tracker _

[issue30825] csv.Sniffer does not detect lineterminator

2018-11-08 Thread Skip Montanaro
Skip Montanaro added the comment: A couple comments. 1. Terry Reedy wrote: > The csv expert listed in https://devguide.python.org/experts/ is marked as > inactive That would be me. I am indeed inactive w.r.t. fixing broken stuff, and don't want to feel obligated to jump in with both feet wh

[issue30825] csv.Sniffer does not detect lineterminator

2018-11-08 Thread Gertjan van den Burg
Gertjan van den Burg added the comment: Note that the current CSV parser in _csv.c doesn't require the line terminator, it eats up \r and \n where necessary. See: https://github.com/python/cpython/blob/fd512d76456b65c529a5bc58d8cfe73e4a10de7a/Modules/_csv.c#L752 This is why the line termina

[issue30825] csv.Sniffer does not detect lineterminator

2018-10-04 Thread Neil Schemenauer
Neil Schemenauer added the comment: There is another issue related to this. If you use codecs to get a reader, it uses str.splitlines() internally, which treats a bunch of different characters as line terminators. See issue #18291 and: https://docs.python.org/3.8/library/stdtypes.html#str.

[issue30825] csv.Sniffer does not detect lineterminator

2018-02-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: While Sniffer *returns* a dialect with lineterminator = '\r\n', it *uses* '\n' for splitting. This is slightly odd, as it leaves lines terminated by '\r' while detecting within-line parameters, but it does not affect such detection. Are there csv files in th

[issue30825] csv.Sniffer does not detect lineterminator

2018-02-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Looking at the code and docstring, lineterminator was intentionally (knowingly) not sniffed, making this a feature addition. -- ___ Python tracker __

[issue30825] csv.Sniffer does not detect lineterminator

2018-02-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: The csv expert listed in https://devguide.python.org/experts/ is marked as inactive, and I have never used the module. So you might need to ask for help on core-mentorship list. The csv doc for Sniffer.sniff says "Analyze the given sample and return a Diale

[issue30825] csv.Sniffer does not detect lineterminator

2017-07-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30825] csv.Sniffer does not detect lineterminator

2017-07-01 Thread Max Vorobev
Changes by Max Vorobev : -- pull_requests: +2595 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30825] csv.Sniffer does not detect lineterminator

2017-07-01 Thread Max Vorobev
New submission from Max Vorobev: Line terminator defaults to '\r\n' while detecting dialect in csv.Sniffer -- components: Library (Lib) messages: 297497 nosy: Max Vorobev priority: normal severity: normal status: open title: csv.Sniffer does not detect lineterminator type: behavior versi