gh-132261: Store annotations at hidden internal keys in the class dict by JelleZijlstra · Pull Request #132345 · python/cpython (original) (raw)

added 3 commits

April 9, 2025 21:01

@JelleZijlstra

@JelleZijlstra @carljm

…e-132261.gL8thm.rst

Co-authored-by: Carl Meyer carl@oddbird.net

cjwatson added a commit to cjwatson/zope.interface that referenced this pull request

Jan 7, 2026

@cjwatson

Following python/cpython#132345, type annotations result in the annotate function being stored at __annotate_func. This caused test failures in klein along the lines of:

zope.interface.exceptions.BrokenMethodImplementation: The object FrozenHTTPHeaders(rawHeaders=()) has failed to implement interface klein._imessage.IHTTPHeaders: The contract of klein._imessage.IHTTPHeaders.__annotate_func__(format) is violated because 'FrozenHTTPHeaders.__annotate__()' doesn't allow enough arguments.

Ignore this new internal name.

icemac pushed a commit to zopefoundation/zope.interface that referenced this pull request

Jan 9, 2026

@cjwatson

Following python/cpython#132345, type annotations result in the annotate function being stored at __annotate_func. This caused test failures in klein along the lines of:

zope.interface.exceptions.BrokenMethodImplementation: The object FrozenHTTPHeaders(rawHeaders=()) has failed to implement interface klein._imessage.IHTTPHeaders: The contract of klein._imessage.IHTTPHeaders.__annotate_func__(format) is violated because 'FrozenHTTPHeaders.__annotate__()' doesn't allow enough arguments.

Ignore this new internal name.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})