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

Merge branch 'master' into dependabot/pip/pip-ac29afaf97 · python-zeroconf/python-zeroconf@ea9dc2f · GitHub

Repository navigation

Commit ea9dc2f

Browse files
authored
Merge branch 'master' into dependabot/pip/pip-ac29afaf97
2 parents 694c1f0 + f8b9ac5 commit ea9dc2f

6 files changed

Lines changed: 88 additions & 31 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
<!-- version list -->
44

5+
## v0.151.5 (2026-09-28)
6+
7+
### Bug Fixes
8+
9+
- Build only the sdist in the release job
10+
([#1921](https://github.com/python-zeroconf/python-zeroconf/pull/1921),
11+
[`1d939f4`](https://github.com/python-zeroconf/python-zeroconf/commit/1d939f471f045a2e4a5d44cfe35cf4f61e55c5ba))
12+
13+
14+
## v0.151.4 (2026-09-28)
15+
16+
### Bug Fixes
17+
18+
- Skip adapter scan for interface lists with no IPv6 entries
19+
([#1919](https://github.com/python-zeroconf/python-zeroconf/pull/1919),
20+
[`47ec4ba`](https://github.com/python-zeroconf/python-zeroconf/commit/47ec4bab70d548503b937ba357f160eebfa2af1f))
21+
22+
523
## v0.151.3 (2026-08-30)
624

725
### Bug Fixes

‎RELICENSING.md‎

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,32 @@ contributions are covered by the license notice posted on every pull
1212
request, and blame will be re-verified against consent dates before any
1313
switch. Nothing already released changes license.
1414

15-
| GitHub login | Git author name | Consent | Date (UTC) |
16-
| ------------- | ------------------- | ------------------------------------------------------------------------------------------------- | ---------- |
17-
| @bdraco | J. Nick Koston | maintainer, relicense initiator | 2026-08-28 |
18-
| @stevencrader | Steven Crader | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5458645316) | 2026-08-28 |
19-
| @bboe | Bryce Boe | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5458732025) | 2026-08-28 |
20-
| @rima1881 | Amir | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5458753986) | 2026-08-28 |
21-
| @jpbede | Jan-Philipp Benecke | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5460526155) | 2026-08-29 |
22-
| @jstasiak | Jakub Stasiak | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5462270134) | 2026-08-29 |
23-
| @Rotzbua | Rotzbua | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5462300621) | 2026-08-29 |
24-
| @ibygrave | ibygrave | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5463209000) | 2026-08-29 |
25-
| @bachp | Pascal Bach | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5464361992) | 2026-08-29 |
26-
| @cdce8p | Marc Mueller | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5464917296) | 2026-08-29 |
27-
| @agners | Stefan Agner | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5465371892) | 2026-08-29 |
28-
| @devbanu | Alexandru Ciobanu | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5466504402) | 2026-08-30 |
29-
| @marcosdiez | Marcos Diez | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5467084050) | 2026-08-30 |
30-
| @pawlizio | Paul Daumlechner | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5467104893) | 2026-08-30 |
31-
| @schmittner | Milan Stute | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5467166859) | 2026-08-30 |
32-
| @che0 | Petr Novák | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5467942853) | 2026-08-30 |
33-
| @xandey | Sandy Patterson | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5469168708) | 2026-08-30 |
34-
| @smcv | Simon McVittie | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5469536878) | 2026-08-30 |
35-
| @mattsaxon | mattsaxon | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5478214834) | 2026-08-31 |
36-
| @nocarryr | nocarryr | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5486821065) | 2026-09-01 |
37-
| @ZLJasonG | ZLJasonG | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5568109941) | 2026-09-07 |
38-
| @jmpcm | Jorge Miranda | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5568628585) | 2026-09-07 |
39-
| @dtantsur | Dmitry Tantsur | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5573907204) | 2026-09-07 |
15+
| GitHub login | Git author name | Consent | Date (UTC) |
16+
| --------------- | ------------------- | ------------------------------------------------------------------------------------------------- | ---------- |
17+
| @bdraco | J. Nick Koston | maintainer, relicense initiator | 2026-08-28 |
18+
| @stevencrader | Steven Crader | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5458645316) | 2026-08-28 |
19+
| @bboe | Bryce Boe | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5458732025) | 2026-08-28 |
20+
| @rima1881 | Amir | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5458753986) | 2026-08-28 |
21+
| @jpbede | Jan-Philipp Benecke | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5460526155) | 2026-08-29 |
22+
| @jstasiak | Jakub Stasiak | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5462270134) | 2026-08-29 |
23+
| @Rotzbua | Rotzbua | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5462300621) | 2026-08-29 |
24+
| @ibygrave | ibygrave | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5463209000) | 2026-08-29 |
25+
| @bachp | Pascal Bach | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5464361992) | 2026-08-29 |
26+
| @cdce8p | Marc Mueller | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5464917296) | 2026-08-29 |
27+
| @agners | Stefan Agner | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5465371892) | 2026-08-29 |
28+
| @devbanu | Alexandru Ciobanu | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5466504402) | 2026-08-30 |
29+
| @marcosdiez | Marcos Diez | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5467084050) | 2026-08-30 |
30+
| @pawlizio | Paul Daumlechner | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5467104893) | 2026-08-30 |
31+
| @schmittner | Milan Stute | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5467166859) | 2026-08-30 |
32+
| @che0 | Petr Novák | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5467942853) | 2026-08-30 |
33+
| @xandey | Sandy Patterson | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5469168708) | 2026-08-30 |
34+
| @smcv | Simon McVittie | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5469536878) | 2026-08-30 |
35+
| @mattsaxon | mattsaxon | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5478214834) | 2026-08-31 |
36+
| @nocarryr | nocarryr | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5486821065) | 2026-09-01 |
37+
| @ZLJasonG | ZLJasonG | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5568109941) | 2026-09-07 |
38+
| @jmpcm | Jorge Miranda | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5568628585) | 2026-09-07 |
39+
| @dtantsur | Dmitry Tantsur | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5573907204) | 2026-09-07 |
40+
| @jacobtomlinson | Jacob Tomlinson | [comment](https://github.com/python-zeroconf/python-zeroconf/issues/1835#issuecomment-5730191033) | 2026-09-18 |
4041

4142
<details><summary>Commit email mapping (click to expand)</summary>
4243

@@ -63,5 +64,6 @@ switch. Nothing already released changes license.
6364
- @ZLJasonG: 36852337+ZLJasonG@users.noreply.github.com
6465
- @jmpcm: jorge.miguel.miranda@gmail.com
6566
- @dtantsur: divius.inside@gmail.com, dtantsur@protonmail.com
67+
- @jacobtomlinson: jacobtomlinson@users.noreply.github.com
6668

6769
</details>

‎pyproject.toml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[project]
66
name = "zeroconf"
7-
version = "0.151.3"
7+
version = "0.151.5"
88
license = "LGPL-2.1-or-later"
99
description = "A pure python implementation of multicast DNS service discovery"
1010
readme = "README.rst"
@@ -56,7 +56,7 @@ version_toml = ["pyproject.toml:project.version"]
5656
version_variables = [
5757
"src/zeroconf/__init__.py:__version__"
5858
]
59-
build_command = "pip install poetry && poetry build"
59+
build_command = "pip install poetry && poetry build --format sdist"
6060
tag_format = "{version}"
6161
allow_zero_version = true
6262

‎src/zeroconf/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
__author__ = "The python-zeroconf authors" # full history in COPYING and git
7575
__maintainer__ = "J. Nick Koston <nick@koston.org>"
76-
__version__ = "0.151.3"
76+
__version__ = "0.151.5"
7777
__license__ = "LGPL"
7878

7979

‎src/zeroconf/_utils/net.py‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,21 @@ def ip6_addresses_to_indexes(
126126
:param interfaces: List of IP addresses and indexes.
127127
:returns: List of indexes.
128128
"""
129-
result = []
129+
result: list[tuple[tuple[str, int, int], int]] = []
130+
needs_scan = [
131+
iface
132+
for iface in interfaces
133+
if isinstance(iface, int) or (isinstance(iface, str) and ipaddress.ip_address(iface).version == 6)
134+
]
135+
if not needs_scan:
136+
return result
137+
130138
adapters = ifaddr.get_adapters()
131139

132-
for iface in interfaces:
140+
for iface in needs_scan:
133141
if isinstance(iface, int):
134142
result.append((interface_index_to_ip6_address(adapters, iface), iface)) # type: ignore[arg-type]
135-
elif isinstance(iface, str) and ipaddress.ip_address(iface).version == 6:
143+
else:
136144
result.append(ip6_to_address_and_index(adapters, iface)) # type: ignore[arg-type]
137145

138146
return result

‎tests/utils/test_net.py‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,35 @@ def test_ip6_addresses_to_indexes():
118118
assert netutils.ip6_addresses_to_indexes(interfaces_2) == [(("2001:db8::", 1, 1), 1)]
119119

120120

121+
@pytest.mark.parametrize("interfaces", [[], ["192.168.1.5"], ["192.168.1.5", "169.254.3.2"]])
122+
def test_ip6_addresses_to_indexes_skips_scan_without_ipv6(interfaces: list[str]) -> None:
123+
"""Test the adapters are not scanned when there are no IPv6 entries."""
124+
with patch("zeroconf._utils.net.ifaddr.get_adapters") as mock_get_adapters:
125+
assert netutils.ip6_addresses_to_indexes(interfaces) == []
126+
mock_get_adapters.assert_not_called()
127+
128+
129+
def test_ip6_addresses_to_indexes_scans_once() -> None:
130+
"""Test the adapters are scanned once for a mixed list."""
131+
with patch(
132+
"zeroconf._utils.net.ifaddr.get_adapters",
133+
return_value=_generate_mock_adapters(),
134+
) as mock_get_adapters:
135+
assert netutils.ip6_addresses_to_indexes(["192.168.1.5", "2001:db8::", 1, "fd00:db8::"]) == [
136+
(("2001:db8::", 1, 1), 1),
137+
(("2001:db8::", 1, 1), 1),
138+
(("fd00:db8::", 1, 1), 1),
139+
]
140+
mock_get_adapters.assert_called_once()
141+
142+
143+
def test_normalize_interface_choice_ipv4_list_skips_scan() -> None:
144+
"""Test an IPv4 only list is normalized without scanning the adapters."""
145+
with patch("zeroconf._utils.net.ifaddr.get_adapters") as mock_get_adapters:
146+
assert netutils.normalize_interface_choice(["192.168.1.5"]) == ["192.168.1.5"]
147+
mock_get_adapters.assert_not_called()
148+
149+
121150
def test_normalize_interface_choice_errors():
122151
"""Test we generate exception on invalid input."""
123152
with (

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL