Description
Cython 3.1.0 is in RC phase already, so we can expect a final release sooner than later. As #1559 shows, zeroconf currently doesn't work with it and I wasn't able to find any tracking issue for the issues.
I have been trying to fix it myself but I'm afraid it's above my pay grade. From what I gather, Cython 3.1 got better at type annotations in .py
files, and all the issues I've hit were somehow related to type annotations.
I've filed #1574 to fix one case of low-hanging fruit.
Another issue I've noticed is the type mismatch in DNSRecord.ttl
:
python-zeroconf/src/zeroconf/_dns.pxd
Lines 45 to 47 in f5c15e9
python-zeroconf/src/zeroconf/_dns.py
Lines 164 to 178 in f5c15e9
Other signature mismatches I couldn't grasp. It is possible that they are actually a bug in Cython, but I don't really know Cython, so I'd appreciate if someone with better understanding of it checked, and possibly reported a bug upstream.
FWICS I can reproduce the same error with the following minimal reproducer:
.pxd:
cdef void foo(object x);
.py:
def foo(x: int) -> None:
...
but I don't know how int
is supposed to be mapped here.