Mercurial > hg-stable
changeset 51708:7862a5ac35cf stable
zope-interface: add compatibility with 3.13 compiler attributes
We could follow-up with an actual vendoring update from the newest version
of zope-interface in the new cycle since we're dropping 3.7 and down.
However we are also in the process of replacing zope-interface with Protocol, so
hopefully we can simply drop the zope-interface vendoring.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Thu, 24 Oct 2024 18:58:58 +0200 |
parents | 0b17a0578a48 |
children | b5efb7a7d2a5 |
files | mercurial/thirdparty/zope/interface/interface.py |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/thirdparty/zope/interface/interface.py Thu Oct 24 15:35:45 2024 +0200 +++ b/mercurial/thirdparty/zope/interface/interface.py Thu Oct 24 18:58:58 2024 +0200 @@ -352,7 +352,14 @@ # Make sure that all recorded attributes (and methods) are of type # `Attribute` and `Method` for name, attr in list(attrs.items()): - if name in ('__locals__', '__qualname__', '__annotations__'): + compiler_attributes = ( + '__locals__', + '__qualname__', + '__annotations__', + '__firstlineno__', + '__static_attributes__', + ) + if name in compiler_attributes: # __locals__: Python 3 sometimes adds this. # __qualname__: PEP 3155 (Python 3.3+) # __annotations__: PEP 3107 (Python 3.0+)