Skip to content

gh-148370: prevent quadratic behavior in configparser.ParsingError.combine#148452

Merged
picnixz merged 3 commits intopython:mainfrom
picnixz:fix/configparse/quadratic-time-148370
Apr 13, 2026
Merged

gh-148370: prevent quadratic behavior in configparser.ParsingError.combine#148452
picnixz merged 3 commits intopython:mainfrom
picnixz:fix/configparse/quadratic-time-148370

Conversation

@picnixz
Copy link
Copy Markdown
Member

@picnixz picnixz commented Apr 12, 2026

@jaraco Just to be sure, but the interface of parser exceptions is private, i.e. only the exception names and some documented fields are considered part of the public API, right?

Copy link
Copy Markdown
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

The whole design is questionable (why do we need to raise multiple exception?), but we should work with what we have.

@picnixz
Copy link
Copy Markdown
Member Author

picnixz commented Apr 13, 2026

I'm merge main into this branch because iOS tests failed twice.

@picnixz picnixz merged commit 2662db0 into python:main Apr 13, 2026
54 checks passed
@miss-islington-app
Copy link
Copy Markdown

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@picnixz picnixz deleted the fix/configparse/quadratic-time-148370 branch April 13, 2026 22:32
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 13, 2026
…rror.combine` (pythonGH-148452)

(cherry picked from commit 2662db0c45aa16232136628457a53681b6683c25)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 13, 2026

GH-148532 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Apr 13, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 13, 2026
…rror.combine` (pythonGH-148452)

(cherry picked from commit 2662db0)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 13, 2026

GH-148533 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 13, 2026
picnixz added a commit that referenced this pull request Apr 13, 2026
…Error.combine` (GH-148452) (#148532)

gh-148370: prevent quadratic behavior in `configparser.ParsingError.combine` (GH-148452)
(cherry picked from commit 2662db0)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this pull request Apr 13, 2026
…Error.combine` (GH-148452) (#148533)

gh-148370: prevent quadratic behavior in `configparser.ParsingError.combine` (GH-148452)
(cherry picked from commit 2662db0)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants