[3.10] gh-109638: Fix exponential time in csv.Sniffer for doubled quotes (GH-154868) (GH-155113) (#155116)
* [3.13] gh-109638: Fix exponential time in csv.Sniffer for doubled quotes (GH-154868) (GH-155113)
(cherry picked from commit eaa9bac70343f2e0a8499ac4a1894ef7608ef0fa)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit d52184ba1ed0e7c0fe8afe4928fbb72a0f9526fb)
* Match the body of a quoted field without possessive quantifiers
They were added in 3.11. An unrolled loop is unambiguous at every
position, so it does not backtrack either.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>