git: 44b563ad7b88 - main - devel/py-zope.interface: fix with Python 3.13 and 3.14
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Nov 2026 21:27:52 UTC
The branch main has been updated by rm:
URL: https://cgit.FreeBSD.org/ports/commit/?id=44b563ad7b88261eba3b034807814c715a0953a1
commit 44b563ad7b88261eba3b034807814c715a0953a1
Author: Patrick Crandol <patrick@crandol.com>
AuthorDate: 2026-11-04 21:24:57 +0000
Commit: Ruslan Makhmatkhanov <rm@FreeBSD.org>
CommitDate: 2026-11-04 21:26:53 +0000
devel/py-zope.interface: fix with Python 3.13 and 3.14
Backport upstream change to make it work with python 3.13 and 3.14
PR: 299758
Reported by: Patrick Crandol <patrick@crandol.com>
---
devel/py-zope.interface/Makefile | 8 +++--
.../files/patch-src_zope_interface_interface.py | 34 ++++++++++++++++++++++
2 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/devel/py-zope.interface/Makefile b/devel/py-zope.interface/Makefile
index fd0616b40c61..679c922c2c82 100644
--- a/devel/py-zope.interface/Makefile
+++ b/devel/py-zope.interface/Makefile
@@ -1,6 +1,6 @@
PORTNAME= zope.interface
-PORTVERSION= 5.3.0
-PORTREVISION= 1
+DISTVERSION= 5.3.0
+PORTREVISION= 2
CATEGORIES= devel python zope
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -13,8 +13,10 @@ WWW= https://pypi.org/project/zope.interface/
LICENSE= ZPL21
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR}
+
USES= python
-USE_PYTHON= autoplist distutils
+USE_PYTHON= autoplist concurrent distutils
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/zope/interface/_zope_interface_coptimizations*.so
diff --git a/devel/py-zope.interface/files/patch-src_zope_interface_interface.py b/devel/py-zope.interface/files/patch-src_zope_interface_interface.py
new file mode 100644
index 000000000000..af53b29998d3
--- /dev/null
+++ b/devel/py-zope.interface/files/patch-src_zope_interface_interface.py
@@ -0,0 +1,34 @@
+Description: Ignore the new class namespace attributes of Python 3.13 and 3.14
+ (__static_attributes__, __firstlineno__, ...), which made every interface
+ fail with InvalidInterface.
+Issue ID: none
+Changeset: https://github.com/zopefoundation/zope.interface/commit/0081260bd55c25847d8cf6aac929fc80f4f58fd3
+ (__static_attributes__),
+ https://github.com/zopefoundation/zope.interface/commit/adab2bd316b7a435d3d78871f31d43025421fb2b
+ (__firstlineno__),
+ https://github.com/zopefoundation/zope.interface/commit/682b65896b9ecacc6bf59aee96d1fcefc4018de5
+ (__classdictcell__),
+ https://github.com/zopefoundation/zope.interface/commit/8d269cb069c1f13ed59dbb0ef8f8ecc4cddb3069
+ (__annotate_func__)
+TODO: Drop when updating to zope.interface 8.2 or later (the first release
+ with __annotate_func__, needed for Python 3.14).
+
+--- src/zope/interface/interface.py.orig 2021-03-18 10:15:23 UTC
++++ src/zope/interface/interface.py
+@@ -819,6 +819,16 @@ class InterfaceClass(_InterfaceClassBase
+ '__qualname__',
+ # __annotations__: PEP 3107 (Python 3.0+)
+ '__annotations__',
++ # __static_attributes__: Python 3.13a6+
++ # https://github.com/python/cpython/pull/115913
++ '__static_attributes__',
++ # __firstlineno__: Python 3.13b1+
++ # https://github.com/python/cpython/pull/118475
++ '__firstlineno__',
++ # __classdictcell__: Python 3.14
++ '__classdictcell__',
++ # __annotate_func__: Python 3.14b1+
++ '__annotate_func__',
+ )
+ and aval is not _decorator_non_return
+ }