Skip to content

Ignore __annotate_func__ added in Python 3.14b1#351

Merged
icemac merged 1 commit intozopefoundation:masterfrom
cjwatson:annotate-func
Jan 9, 2026
Merged

Ignore __annotate_func__ added in Python 3.14b1#351
icemac merged 1 commit intozopefoundation:masterfrom
cjwatson:annotate-func

Conversation

@cjwatson
Copy link
Contributor

@cjwatson cjwatson commented 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.

  • I signed and returned the Zope Contributor Agreement, and received and accepted an invitation to join a team in the zopefoundation GitHub organization.
  • I verified there aren't any other open pull requests for the same change.
  • I followed the guidelines in Developer guidelines.
  • I successfully ran code quality checks on my changes locally.
  • I successfully ran tests on my changes locally.
  • If needed, I added new tests for my changes.
  • [N/A] If needed, I added documentation for my changes.
  • I included a change log entry in my commits.

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.
Copy link
Member

@icemac icemac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this issue.

@icemac icemac merged commit 8d269cb into zopefoundation:master Jan 9, 2026
48 checks passed
@icemac
Copy link
Member

icemac commented Jan 9, 2026

Just released in https://pypi.org/project/zope.interface/8.2/.

@cjwatson cjwatson deleted the annotate-func branch January 9, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants