Skip to content

gh-130821: Add type info to error message in Modules/_abc.c - #156080

Closed
JMak-Security wants to merge 7 commits into
python:mainfrom
JMak-Security:patch-1
Closed

gh-130821: Add type info to error message in Modules/_abc.c#156080
JMak-Security wants to merge 7 commits into
python:mainfrom
JMak-Security:patch-1

Conversation

@JMak-Security

Copy link
Copy Markdown

Closes gh-130821

This PR updates the error message format in Modules/_abc.c to include the actual returned type information, matching the new consistent formatting standard requested by the core team.

Closes pythongh-130821

This PR updates the error message format in `Modules/_abc.c` to include the actual returned type information, matching the new consistent formatting standard requested by the core team.
@bedevere-app

bedevere-app Bot commented Aug 20, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot

python-cla-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@JMak-Security

Copy link
Copy Markdown
Author

This is a small error message consistency fix. Could a maintainer please help apply the skip news label? Thank you!

@bedevere-app

bedevere-app Bot commented Aug 20, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app

bedevere-app Bot commented Aug 20, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app

bedevere-app Bot commented Aug 20, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

This change includes the type name in the TypeError raised when items() returns a non-iterable during abstract method computation in the abc module.
@picnixz

picnixz commented Aug 20, 2026

Copy link
Copy Markdown
Member

This is already part of #144737.

@picnixz picnixz closed this Aug 20, 2026
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.

Inconsistent error messages when returning the wrong type for the type-conversion magic methods

2 participants