Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,12 @@ jobs:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.14t"
- "pypy-3.9"
- "pypy-3.10"
os:
- ubuntu-latest
Expand All @@ -72,12 +70,8 @@ jobs:
extension: use_cython
- os: windows-latest
extension: use_cython
- os: windows-latest
python-version: "pypy-3.9"
- os: windows-latest
python-version: "pypy-3.10"
- os: macos-latest
python-version: "pypy-3.9"
- os: macos-latest
python-version: "pypy-3.10"
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py39-plus]
args: [--py310-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
Expand Down
10 changes: 5 additions & 5 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ path. The authoritative list of cythonized modules lives in
and `zeroconf/asyncio.py` re-export.

- **Line length**: 110 (ruff `line-length = 110`).
`requires-python = ">=3.9"`, `target-version = "py39"` for
ruff; pyupgrade runs `--py39-plus`.
`requires-python = ">=3.10"`, `target-version = "py310"` for
ruff; pyupgrade runs `--py310-plus`.

- **Imports**: ruff/isort sorted, `profile = "black"`,
`known_first_party = ["zeroconf", "tests"]`. Prefer
`from __future__ import annotations` so modern type syntax
works on 3.9.
works on 3.10.

- **Generated `.c` files are not lint-targets.** `*.c` files
next to each cythonized module are Cython output — never hand-
Expand Down Expand Up @@ -124,8 +124,8 @@ CodSpeed benchmarks live under `tests/benchmarks/` and run in CI
through `CodSpeedHQ/action`. Ad-hoc microbenchmarks for manual
profiling live under `bench/` — those don't run in CI.

The CI matrix includes CPython 3.9 – 3.14, the free-threaded
3.14t build, and PyPy 3.9 / 3.10. Don't add anything that breaks
The CI matrix includes CPython 3.10 – 3.14, the free-threaded
3.14t build, and PyPy 3.10. Don't add anything that breaks
on the free-threaded build (no module-level mutable globals
mutated from multiple threads without locks; no
`PyDict_Next`-style escape hatches in Cython).
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Compared to some other Zeroconf/Bonjour/Avahi Python packages, python-zeroconf:
Python compatibility
--------------------

* CPython 3.9+
* PyPy 3.9+
* CPython 3.10+
* PyPy 3.10+

Versioning
----------
Expand Down
54 changes: 3 additions & 51 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors = [
{ name = "Jakub Stasiak" },
{ name = "J. Nick Koston" },
]
requires-python = ">=3.9"
requires-python = ">=3.10"

[project.urls]
"Repository" = "https://github.com/python-zeroconf/python-zeroconf"
Expand Down Expand Up @@ -80,7 +80,7 @@ match = "(?!(master|release-0.x)$)"
prerelease = true

[tool.poetry.dependencies]
python = "^3.9"
python = "^3.10"
ifaddr = ">=0.1.7"

[tool.poetry.group.dev.dependencies]
Expand All @@ -97,7 +97,7 @@ sphinx = "^7.4.7 || ^8.1.3"
sphinx-rtd-theme = "^3.1.0"

[tool.ruff]
target-version = "py39"
target-version = "py310"
line-length = 110

[tool.ruff.lint]
Expand Down
4 changes: 2 additions & 2 deletions src/zeroconf/_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from collections.abc import Iterable
from heapq import heapify, heappop, heappush
from typing import Union, cast
from typing import cast

from ._dns import (
DNSAddress,
Expand All @@ -40,7 +40,7 @@
from .const import _ONE_SECOND, _TYPE_PTR

_UNIQUE_RECORD_TYPES = (DNSAddress, DNSHinfo, DNSPointer, DNSText, DNSService)
_UniqueRecordsType = Union[DNSAddress, DNSHinfo, DNSPointer, DNSText, DNSService]
_UniqueRecordsType = DNSAddress | DNSHinfo | DNSPointer | DNSText | DNSService
_DNSRecordCacheType = dict[str, dict[DNSRecord, DNSRecord]]
_DNSRecord = DNSRecord
_str = str
Expand Down
3 changes: 2 additions & 1 deletion src/zeroconf/_services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
from __future__ import annotations

import enum
from typing import TYPE_CHECKING, Any, Callable
from collections.abc import Callable
from typing import TYPE_CHECKING, Any

if TYPE_CHECKING:
from .._core import Zeroconf
Expand Down
3 changes: 1 addition & 2 deletions src/zeroconf/_services/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@
import threading
import time
import warnings
from collections.abc import Iterable
from collections.abc import Callable, Iterable
from functools import partial
from types import TracebackType # used in type hints
from typing import (
TYPE_CHECKING,
Any,
Callable,
cast,
)

Expand Down
4 changes: 2 additions & 2 deletions src/zeroconf/_utils/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import sys
import warnings
from collections.abc import Iterable, Sequence
from typing import Any, Union, cast
from typing import Any, cast

import ifaddr

Expand All @@ -44,7 +44,7 @@ class InterfaceChoice(enum.Enum):
All = 2


InterfacesType = Union[Sequence[Union[str, int, tuple[tuple[str, int, int], int]]], InterfaceChoice]
InterfacesType = Sequence[str | int | tuple[tuple[str, int, int], int]] | InterfaceChoice


@enum.unique
Expand Down
3 changes: 1 addition & 2 deletions src/zeroconf/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@

import asyncio
import contextlib
from collections.abc import Awaitable
from collections.abc import Awaitable, Callable
from types import TracebackType # used in type hints
from typing import Callable

from ._core import Zeroconf
from ._dns import DNSQuestionType
Expand Down
Loading