Skip to content

gh-146102: Don't clear exception on success in odictobject.c#151347

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:odict
Jun 15, 2026
Merged

gh-146102: Don't clear exception on success in odictobject.c#151347
vstinner merged 1 commit into
python:mainfrom
vstinner:odict

Conversation

@vstinner

@vstinner vstinner commented Jun 11, 2026

Copy link
Copy Markdown
Member

Calling PyErr_Clear() on success can mask a pending exception. Replace it with an assertion checking that no exception is set.

Calling PyErr_Clear() on success can mask a pending exception.
Replace it with an assertion checking that no exception is set.
@vstinner

Copy link
Copy Markdown
Member Author

@vstinner vstinner merged commit b3b7c00 into python:main Jun 15, 2026
59 checks passed
@vstinner vstinner deleted the odict branch June 15, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants