Skip to content

tomllib may raise exceptions other than TOMLDecodeError#20

Merged
StanFromIreland merged 4 commits intopython:mainfrom
StanFromIreland:tomllib-excepts
Apr 5, 2026
Merged

tomllib may raise exceptions other than TOMLDecodeError#20
StanFromIreland merged 4 commits intopython:mainfrom
StanFromIreland:tomllib-excepts

Conversation

@StanFromIreland
Copy link
Copy Markdown
Member

CI Fuzz has been failing on RecursionErrors in CPython, e.g. https://github.com/python/cpython/actions/runs/23989203001/job/69969245811. I also added all of the other exceptions the module can raise.

@StanFromIreland StanFromIreland requested a review from a team April 5, 2026 14:35
Copy link
Copy Markdown
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

LGTM

Nit: instead of adding a catch per exception you can make a global variable with a tuple of all of them and catch the tuple

@StanFromIreland StanFromIreland merged commit 2d5ff34 into python:main Apr 5, 2026
@StanFromIreland StanFromIreland deleted the tomllib-excepts branch April 5, 2026 15:54
@StanFromIreland
Copy link
Copy Markdown
Member Author

Thanks for the reviews!

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.

3 participants