Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 954107 - dev-python/zeroconf-0.146.3: src/zeroconf/_listener.py:225:4: Signature not compatible with previous declaration
Summary: dev-python/zeroconf-0.146.3: src/zeroconf/_listener.py:225:4: Signature not c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 954128
  Show dependency tree
 
Reported: 2025-04-20 10:52 UTC by Michael Moon
Modified: 2025-05-03 17:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (zeroconf-0.146.3_build.log.txt,17.14 KB, text/plain)
2025-04-20 10:52 UTC, Michael Moon
Details
emerge --info (emerge-info.txt,12.24 KB, text/plain)
2025-04-20 10:52 UTC, Michael Moon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Moon 2025-04-20 10:52:22 UTC
Created attachment 925447 [details]
build.log

Error compiling Cython file:
------------------------------------------------------------
...
    def _cancel_any_timers_for_addr(self, addr: _str) -> None:
        """Cancel any future truncated packet timers for the address."""
        if addr in self._timers:
            self._timers.pop(addr).cancel()

    def _respond_query(
    ^
------------------------------------------------------------

src/zeroconf/_listener.py:225:4: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
        object port,
        object transport,
        tuple v6_flow_scope
    )

    cpdef _respond_query(
                        ^
------------------------------------------------------------

src/zeroconf/_listener.pxd:51:24: Previous declaration is here

---

previously, zeroconf-0.146.1 worked fine with cython-3.0.12-r1, and cython-3.1.0_beta1-r1 was installed just before this package.
Comment 1 Michael Moon 2025-04-20 10:52:37 UTC
Created attachment 925448 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-21 10:11:43 UTC
OK, so:

    def _respond_query(
        self,
        msg: DNSIncoming | None,
        addr: _str,
        port: _int,
        transport: _WrappedTransport,
        v6_flow_scope: tuple[()] | tuple[int, int],

vs

    cpdef _respond_query(
        self,
        object msg,
        object addr,
        object port,
        object transport,
        tuple v6_flow_scope
    )

They even get 'msg' right for handle_query_or_defer, but not for _respond_query.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-21 10:34:04 UTC
I started fixing these but then hit some weirdness with Optional. https://cython.readthedocs.io/en/latest/src/tutorial/pure.html#typing-module implies it should work but it didn't seem to for me.
Comment 4 Larry the Git Cow gentoo-dev 2025-05-03 13:12:07 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aca62fd578977aefdca33ee632169c0185d08a8

commit 4aca62fd578977aefdca33ee632169c0185d08a8
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2025-05-03 12:29:38 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2025-05-03 13:12:01 +0000

    dev-python/zeroconf: Apply a workaround for Cython-3.1 issues
    
    Bug: https://bugs.gentoo.org/954107
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 .../files/zeroconf-0.146.5-cython-3.1.patch        | 41 ++++++++++++++++++++++
 dev-python/zeroconf/zeroconf-0.146.5.ebuild        |  7 +++-
 2 files changed, 47 insertions(+), 1 deletion(-)
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2025-05-03 17:04:31 UTC
Also fixed in upstream git now, though our workaround is smaller.