Skip to content

gh-130399: Set .name and .obj on AttributeError raised by descriptor __set__ - #158512

Open
Joekrry wants to merge 1 commit into
python:mainfrom
Joekrry:gh-130399-property-setter-suggestions
Open

Joekrry wants to merge 1 commit into
python:mainfrom
Joekrry:gh-130399-property-setter-suggestions

Conversation

@Joekrry

@Joekrry Joekrry commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

…iptor __set__ | _PyObject_GenericSetAttrWithDict called the descriptor's tp_descr_set but never called _PyObject_SetAttributeErrorContext on failure. Every other error path in the function calls that. Adding the call provides context so a read only property provides a 'did you mean'
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