Skip to content

gh-75008: guess lineterminator in csv.Sniffer#18336

Open
vmax wants to merge 5 commits into
python:mainfrom
vmax:bpo-30825
Open

gh-75008: guess lineterminator in csv.Sniffer#18336
vmax wants to merge 5 commits into
python:mainfrom
vmax:bpo-30825

Conversation

@vmax

@vmax vmax commented Feb 3, 2020

Copy link
Copy Markdown

@vmax vmax changed the title Bpo 30825 bpo-30825: guess lineterminator in csv.Sniffer Feb 3, 2020
@vmax
vmax requested a review from csabella February 3, 2020 19:32
@csabella
csabella removed their request for review February 4, 2020 00:34
Comment thread Misc/NEWS.d/next/Library/2018-02-12-05-10-28.bpo-30825.t0RXql.rst Outdated
Comment thread Lib/csv.py Outdated

@rruuaanng rruuaanng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe csv.py should be sent to another reviewer for review.

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 7, 2026
@serhiy-storchaka

Copy link
Copy Markdown
Member

Thank you for the patch, and sorry that it was left without attention for so long. The sniffer was rewritten on the main branch (gh-83273) and this patch no longer applies.

It should be easier now: the sample is split into lines keeping their line breaks, so detection can count '\r\n', '\n' and '\r' in a _detect_lineterminator() method, next to _detect_doublequote(). Note that falling back to os.linesep makes the result platform dependent; '\r\n' looks better for a sample without any line break.

@serhiy-storchaka serhiy-storchaka changed the title bpo-30825: guess lineterminator in csv.Sniffer gh-75008: guess lineterminator in csv.Sniffer Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants