Skip to content

[3.11] gh-98820: Fix quadratic time in csv.Sniffer for quoted fields (GH-154867) - #155538

Merged
pablogsal merged 1 commit into
python:3.11from
serhiy-storchaka:backport-3.11-gh98820
Aug 11, 2026
Merged

[3.11] gh-98820: Fix quadratic time in csv.Sniffer for quoted fields (GH-154867)#155538
pablogsal merged 1 commit into
python:3.11from
serhiy-storchaka:backport-3.11-gh98820

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Manual backport of #154867, cherry-picked from the 3.12 backport (#155166).

It applies unchanged: 3.11 supports possessive quantifiers.

Sniffing '"abcdefghijklmnopqrstuvwxyz"\n' * n with delimiters=',:|\t' is now linear: 0.142, 0.286 and 0.569 s for n = 2500, 5000 and 10000.

…ields (pythonGH-154867)

(cherry picked from commit b30c7fa)
(cherry picked from commit 39dac55)
@bedevere-app bedevere-app Bot added the type-security A security issue label Aug 11, 2026
@pablogsal
pablogsal merged commit b09a67a into python:3.11 Aug 11, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-security A security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants