Source: python-klein Version: 24.8.0-2 Severity: serious Tags: forky sid User: [email protected] Usertags: python3.14
Hi Maintainer The autopkgtests of this package fail with Python 3.14 [1]. I've copied what I hope is the relevant part of the log below. Regards Graham [1] https://ci.debian.net/packages/p/python-klein/testing/amd64/ 47s =================================== FAILURES =================================== 47s ____________________ FrozenHTTPHeadersTests.test_interface _____________________ 47s 47s self = <test.test_headers.FrozenHTTPHeadersTests testMethod=test_interface> 47s interface = <InterfaceClass klein._imessage.IHTTPHeaders> 47s obj = FrozenHTTPHeaders(rawHeaders=()) 47s 47s def assertProvides(self, interface: Type[Interface], obj: object) -> None: 47s """ 47s Assert that a object provides an interface. 47s 47s @param interface: The interface the object is expected to provide. 47s @param obj: The object to test. 47s """ 47s try: 47s > self.assertTrue(verifyObject(interface, obj)) 47s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 47s 47s test/_trial.py:32: 47s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 47s /usr/lib/python3/dist-packages/zope/interface/verify.py:183: in verifyObject 47s return _verify(iface, candidate, tentative, vtype='o') 47s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 47s /usr/lib/python3/dist-packages/zope/interface/verify.py:91: in _verify 47s raise excs[0] 47s /usr/lib/python3/dist-packages/zope/interface/verify.py:85: in _verify 47s _verify_element(iface, name, desc, candidate, vtype) 47s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 47s 47s iface = <InterfaceClass klein._imessage.IHTTPHeaders> 47s name = '__annotate_func__' 47s desc = <zope.interface.interface.Method object at 0x7ffb8b5e9e50 klein._imessage.IHTTPHeaders.__annotate_func__(format)> 47s candidate = FrozenHTTPHeaders(rawHeaders=()), vtype = 'o' 47s 47s def _verify_element(iface, name, desc, candidate, vtype): 47s # Here the `desc` is either an `Attribute` or `Method` instance 47s try: 47s attr = getattr(candidate, name) 47s except AttributeError: 47s 47s if (not isinstance(desc, Method)) and vtype == 'c': 47s # We can't verify non-methods on classes, since the 47s # class may provide attrs in it's __init__. 47s return 47s 47s # TODO: This should use ``raise...from`` 47s raise BrokenImplementation(iface, desc, candidate) 47s 47s if not isinstance(desc, Method): 47s # If it's not a method, there's nothing else we can test 47s return 47s 47s if inspect.ismethoddescriptor(attr) or inspect.isbuiltin(attr): 47s # The first case is what you get for things like ``dict.pop`` 47s # on CPython (e.g., ``verifyClass(IFullMapping, dict))``). The 47s # second case is what you get for things like ``dict().pop`` on 47s # CPython (e.g., ``verifyObject(IFullMapping, dict()))``. 47s # In neither case can we get a signature, so there's nothing 47s # to verify. Even the inspect module gives up and raises 47s # ValueError: no signature found. The ``__text_signature__`` attribute 47s # isn't typically populated either. 47s # 47s # Note that on PyPy 2 or 3 (up through 7.3 at least), these are not 47s # true for things like ``dict.pop`` (but might be true for C 47s # extensions?) 47s return 47s 47s if isinstance(attr, FunctionType): 47s 47s if isinstance(candidate, type) and vtype == 'c': 47s # This is an "unbound method". 47s # Only unwrap this if we're verifying implementedBy; 47s # otherwise we can unwrap @staticmethod on classes that directly 47s # provide an interface. 47s meth = fromFunction(attr, iface, name=name, imlevel=1) 47s else: 47s # Nope, just a normal function 47s meth = fromFunction(attr, iface, name=name) 47s 47s elif ( 47s isinstance(attr, MethodTypes) and 47s type(attr.__func__) is FunctionType 47s ): 47s meth = fromMethod(attr, iface, name) 47s 47s elif isinstance(attr, property) and vtype == 'c': 47s # Without an instance we cannot be sure it's not a 47s # callable. 47s # TODO: This should probably check inspect.isdatadescriptor(), 47s # a more general form than ``property`` 47s return 47s 47s else: 47s if not callable(attr): 47s raise BrokenMethodImplementation( 47s desc, 47s "implementation is not a method", 47s attr, 47s iface, 47s candidate 47s ) 47s # sigh, it's callable, but we don't know how to introspect it, so 47s # we have to give it a pass. 47s return 47s 47s # Make sure that the required and implemented method signatures are 47s # the same. 47s mess = _incompat(desc.getSignatureInfo(), meth.getSignatureInfo()) 47s if mess: 47s > raise BrokenMethodImplementation(desc, mess, attr, iface, candidate) 47s E 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.

