FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: some Cython 3.1.0rc1 build failures by mgorny · Pull Request #1574 · python-zeroconf/python-zeroconf · GitHub

Repository navigation

chore: some Cython 3.1.0rc1 build failures - #1574

Merged
bdraco merged 1 commit into
python-zeroconf:masterfrom
mgorny:cython-3.1
May 3, 2025
Merged

bdraco merged 1 commit into
python-zeroconf:masterfrom
mgorny:cython-3.1

Conversation

mgorny commented May 3, 2025

Copy link
Copy Markdown
Contributor

Fix the few build failures I've hit with Cython 3.1.0rc1. Unfortunately, I'm stuck at:

Error compiling Cython file:
------------------------------------------------------------
...
        version: IPVersion = IPVersion.All,
    ) -> list[DNSAddress]:
        """Return matching DNSAddress from ServiceInfo."""
        return self._dns_addresses(override_ttl, version)

    def _dns_addresses(
    ^
------------------------------------------------------------

src/zeroconf/_services/info.py:586:4: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
    cpdef addresses_by_version(self, object version)

    cpdef ip_addresses_by_version(self, object version)

    @cython.locals(cacheable=cython.bint)
    cdef cython.list _dns_addresses(self, object override_ttls, object version)
                                   ^
------------------------------------------------------------

src/zeroconf/_services/info.pxd:124:35: Previous declaration is here

and the like. I suspect it doesn't like override_ttls but can't figure out how to make it work.

codecov Bot commented May 3, 2025 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.76%. Comparing base (f5c15e9) to head (b9e8a38).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1574   +/-   ##
=======================================
  Coverage   99.76%   99.76%           
=======================================
  Files          33       33           
  Lines        3400     3400           
  Branches      461      461           
=======================================
  Hits         3392     3392           
  Misses          5        5           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codspeed Bot commented May 3, 2025 •
edited
Loading

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #1574 will not alter performance

Comparing mgorny:cython-3.1 (b9e8a38) with master (f5c15e9)

Summary

✅ 6 untouched benchmarks

mgorny commented May 3, 2025

Copy link
Copy Markdown
Contributor Author

Removed the other change, as apparently there is no way to satisfy both ruff and cython, and limited this to that one clear fix.

Fix `AsyncListener._respond_query()` to use `DNSIncoming` type
for the `msg` argument, matching `handle_query_or_defer()`.  This fixes
the following error with Cython 3.1.0rc1:

```
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
```

mgorny commented May 3, 2025

Copy link
Copy Markdown
Contributor Author

Okay, so the other problem is that _dns.pxd declares DNSRecord.ttl as cython.float but it's float | int on the Python end.

mgorny mentioned this pull request May 3, 2025
bdraco changed the title Fix some Cython 3.1.0rc1 build failures fix: some Cython 3.1.0rc1 build failures May 3, 2025
bdraco changed the title fix: some Cython 3.1.0rc1 build failures chore: some Cython 3.1.0rc1 build failures May 3, 2025

bdraco commented May 3, 2025

Copy link
Copy Markdown
Member

change to chore so it doesn't release. Will try to fix a few more and than do a fix one at the end

bdraco merged commit 02eef34 into python-zeroconf:master May 3, 2025

bdraco commented May 3, 2025

Copy link
Copy Markdown
Member

Thanks @mgorny

mgorny deleted the cython-3.1 branch May 3, 2025 15:05

mgorny commented May 3, 2025

Copy link
Copy Markdown
Contributor Author

Thanks!

This branch had an error being deployed

1 failed deployment
release — b9e8a38c Deployed May 3, 2025 by mgorny
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL