[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

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

JelleZijlstra

added 3 commits

April 9, 2025 21:01

Closed

…e-132261.gL8thm.rst

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

Closed

Open

5 tasks

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

Jan 7, 2026
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.

Merged

7 tasks

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

Jan 9, 2026
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.