Skip to content

gh-159430: Add _PyObject_LookupSpecial error checks in bytes/weakref - #159432

Open
msullivan wants to merge 1 commit into
python:mainfrom
msullivan:gh-159430
Open

msullivan wants to merge 1 commit into
python:mainfrom
msullivan:gh-159430

Conversation

@msullivan

@msullivan msullivan commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

_PyObject_LookupSpecial needs a PyErr_Occurred() check to handle
failures while during the lookup, or else it can fail with a "returned
a result with an exception set" error.

Add some missing ones in bytes and weakref.

AI: a robot reported these bugs to me while I had it trying to collect
a list of something else tangentially related to uses of
_PyObject_LookupSpecial. It also wrote the PR, though none of this
message or the news blurbs.

…akref

_PyObject_LookupSpecial needs a PyErr_Occurred() check to handle
failures while during the lookup, or else it can fail with a "returned
a result with an exception set" error.

Add some missing ones in bytes and weakref/

AI: a robot reported these bugs to me while I had it trying to collect
a list of something else tangentially related to uses of
`_PyObject_LookupSpecial`. It also wrote the PR, though none of this
message or the news blurbs.
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.

1 participant