openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Fix usage of `__annotations__` on instances

Open JelleZijlstra opened this issue 11 months ago • 0 comments

Accessing the __annotations__ attribute on an instance was never documented to work and will stop working in Python 3.14 (discussed in the last paragraph of https://peps.python.org/pep-0749/#metaclass-behavior-with-pep-649). Annotations should be retrieved from the class instead.

JelleZijlstra avatar May 10 '25 22:05 JelleZijlstra