◐ Shell
clean mode source ↗

gh-146102: Don't clear exception on success in odictobject.c by vstinner · Pull Request #151347 · python/cpython

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@vstinner

@vstinner vstinner commented

Jun 11, 2026

edited by bedevere-app Bot

Loading

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

philthompson10 pushed a commit to philthompson10/cpython that referenced this pull request

Jun 17, 2026
…ython#151347)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner @serhiy-storchaka