◐ Shell
clean mode source ↗

fix: fix core reliability, concurrency, and performance issues by roshhellwett · Pull Request #1795 · python-zeroconf/python-zeroconf

and others added 2 commits

June 16, 2026 12:51
- Pin Cython to 3.2.5 in pyproject.toml to resolve native build failures.
- Resolve syntax error in _logger.py module docstring.
- Optimize ServiceRegistry by migrating server and type storage from lists to dicts, enabling O(1) removals and preventing CPU spikes under load.
- Harden RecordManager by utilizing set.discard() to avoid KeyError crashes during asynchronous listener removal.
- Fix python-zeroconf#1780: Stop in-place mutation of cached DNSRecord TTLs to prevent shared state corruption across event loop listeners.
- Update tests to accommodate cache architectural changes and resolve iterator mutations.

@roshhellwett roshhellwett changed the title Fix core reliability, concurrency, and performance issues fix: fix core reliability, concurrency, and performance issues

Jun 16, 2026

@roshhellwett

@pre-commit-ci

- Add type hints using cast to resolve mypy typing issues in test modules

- Ensure 100% codecov branch coverage by ignoring unreachable fallback paths

- Fix code formatting and imports flagged by pre-commit tools

- Update auto-generated setup.py to ignore flake8/ruff formatting
- Fix ServiceRegistry cython type mismatch where record_list was typed as cython.list instead of cython.dict, causing TypeErrors in Linux native cython builds after migrating server and type storage to dicts.