zeroconf 0.151.2__tar.gz → 0.151.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of zeroconf might be problematic. Click here for more details.
- {zeroconf-0.151.2 → zeroconf-0.151.3}/CHANGELOG.md +31 -9
- {zeroconf-0.151.2 → zeroconf-0.151.3}/COPYING +17 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/PKG-INFO +19 -34
- {zeroconf-0.151.2 → zeroconf-0.151.3}/README.rst +15 -32
- {zeroconf-0.151.2 → zeroconf-0.151.3}/pyproject.toml +9 -7
- zeroconf-0.151.3/setup.py +39 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/__init__.py +7 -22
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_cache.py +157 -190
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_core.py +366 -428
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_dns.py +297 -317
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_engine.py +119 -134
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_exceptions.py +21 -36
- zeroconf-0.151.3/src/zeroconf/_handlers/__init__.py +8 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_handlers/answers.py +5 -20
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_handlers/multicast_outgoing_queue.py +11 -26
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_handlers/query_handler.py +162 -181
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_handlers/record_manager.py +39 -74
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_history.py +18 -33
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_listener.py +129 -149
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_logger.py +15 -30
- zeroconf-0.151.3/src/zeroconf/_protocol/__init__.py +8 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_protocol/incoming.py +252 -273
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_protocol/outgoing.pxd +5 -6
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_protocol/outgoing.py +224 -253
- zeroconf-0.151.3/src/zeroconf/_record_update.py +33 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_services/__init__.py +5 -20
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_services/browser.py +184 -220
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_services/info.py +596 -649
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_services/registry.py +29 -44
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_services/types.py +11 -26
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_transport.py +5 -20
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_updates.py +15 -30
- zeroconf-0.151.3/src/zeroconf/_utils/__init__.py +8 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_utils/asyncio.py +5 -20
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_utils/ipaddress.py +27 -42
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_utils/name.py +7 -22
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_utils/net.py +5 -29
- zeroconf-0.151.3/src/zeroconf/_utils/time.py +26 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/asyncio.py +83 -135
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/const.py +38 -55
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/__init__.py +92 -22
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_registry.py +1 -1
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/conftest.py +6 -3
- zeroconf-0.151.3/tests/services/__init__.py +8 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/services/test_browser.py +50 -153
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/services/test_info.py +153 -229
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/services/test_registry.py +27 -116
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/services/test_types.py +19 -45
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_asyncio.py +108 -328
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_core.py +266 -318
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_dns.py +23 -7
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_engine.py +26 -6
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_handlers.py +281 -578
- zeroconf-0.151.3/tests/test_init.py +159 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_interface_update.py +124 -124
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_listener.py +8 -20
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_protocol.py +446 -469
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_services.py +7 -16
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_updates.py +3 -17
- zeroconf-0.151.3/tests/utils/__init__.py +8 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/utils/test_name.py +2 -2
- zeroconf-0.151.2/setup.py +0 -39
- zeroconf-0.151.2/src/zeroconf/_handlers/__init__.py +0 -23
- zeroconf-0.151.2/src/zeroconf/_protocol/__init__.py +0 -23
- zeroconf-0.151.2/src/zeroconf/_record_update.py +0 -48
- zeroconf-0.151.2/src/zeroconf/_utils/__init__.py +0 -23
- zeroconf-0.151.2/src/zeroconf/_utils/time.py +0 -43
- zeroconf-0.151.2/tests/services/__init__.py +0 -23
- zeroconf-0.151.2/tests/test_init.py +0 -193
- zeroconf-0.151.2/tests/utils/__init__.py +0 -23
- {zeroconf-0.151.2 → zeroconf-0.151.3}/build_ext.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/docs/Makefile +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/docs/_ext/zeroconfautodocfix.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/docs/api.rst +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/docs/conf.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/docs/index.rst +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_cache.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_dns.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_handlers/answers.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_handlers/multicast_outgoing_queue.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_handlers/query_handler.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_handlers/record_manager.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_history.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_listener.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_protocol/incoming.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_record_update.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_services/__init__.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_services/browser.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_services/info.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_services/registry.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_updates.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_utils/ipaddress.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/_utils/time.pxd +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/src/zeroconf/py.typed +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/__init__.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/helpers.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_cache.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_cache_bound.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_cache_mark_expire.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_incoming.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_ipaddress.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_listener_dedup.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_mark_seen.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_outgoing.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_send.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/benchmarks/test_txt_properties.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_cache.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_circular_imports.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_exceptions.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_fuzz_incoming.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_history.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/test_logger.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/utils/test_asyncio.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/utils/test_ipaddress.py +0 -0
- {zeroconf-0.151.2 → zeroconf-0.151.3}/tests/utils/test_net.py +0 -0
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- version list -->
|
|
4
4
|
|
|
5
|
+
## v0.151.3 (2026-08-30)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- Correct the recursion available header flag to the rfc 1035 value
|
|
10
|
+
([#1893](https://github.com/python-zeroconf/python-zeroconf/pull/1893),
|
|
11
|
+
[`07e3812`](https://github.com/python-zeroconf/python-zeroconf/commit/07e38121a30ecd3c19690ffc956dead8160e6c46))
|
|
12
|
+
|
|
13
|
+
### Refactoring
|
|
14
|
+
|
|
15
|
+
- Compute probe pacing from fresh clock reads
|
|
16
|
+
([#1888](https://github.com/python-zeroconf/python-zeroconf/pull/1888),
|
|
17
|
+
[`7737108`](https://github.com/python-zeroconf/python-zeroconf/commit/773710807a0159dc49de2a8c875a63d1085df604))
|
|
18
|
+
|
|
19
|
+
- Compute service info request pacing from fresh clock reads
|
|
20
|
+
([#1895](https://github.com/python-zeroconf/python-zeroconf/pull/1895),
|
|
21
|
+
[`49aa15f`](https://github.com/python-zeroconf/python-zeroconf/commit/49aa15f639bc50f05f0f88c8153463a7a42c06ef))
|
|
22
|
+
|
|
23
|
+
### Testing
|
|
24
|
+
|
|
25
|
+
- Fix flaky test_service_browser_expire_callbacks
|
|
26
|
+
([#1879](https://github.com/python-zeroconf/python-zeroconf/pull/1879),
|
|
27
|
+
[`6d061a4`](https://github.com/python-zeroconf/python-zeroconf/commit/6d061a4fb3b3557bafc37ef951c5214f7b24a125))
|
|
28
|
+
|
|
29
|
+
- Make test_qu_response deterministic by injecting the announcement
|
|
30
|
+
([#1845](https://github.com/python-zeroconf/python-zeroconf/pull/1845),
|
|
31
|
+
[`10db10a`](https://github.com/python-zeroconf/python-zeroconf/commit/10db10a8b5db3cbd6e6c6718a6cbb8830f4b9d07))
|
|
32
|
+
|
|
33
|
+
|
|
5
34
|
## v0.151.2 (2026-08-29)
|
|
6
35
|
|
|
7
36
|
### Bug Fixes
|
|
@@ -415,7 +444,7 @@
|
|
|
415
444
|
|
|
416
445
|
### Build System
|
|
417
446
|
|
|
418
|
-
-
|
|
447
|
+
- Use an explicit checkout ref in the release workflow
|
|
419
448
|
([#1669](https://github.com/python-zeroconf/python-zeroconf/pull/1669),
|
|
420
449
|
[`bc8ec8d`](https://github.com/python-zeroconf/python-zeroconf/commit/bc8ec8d59d875522f75901644d423d30d803a030))
|
|
421
450
|
|
|
@@ -2013,17 +2042,10 @@ This also revealed that we do not send NSEC records in the initial broadcast. Th
|
|
|
2013
2042
|
([#1145](https://github.com/python-zeroconf/python-zeroconf/pull/1145),
|
|
2014
2043
|
[`524494e`](https://github.com/python-zeroconf/python-zeroconf/commit/524494edd49bd049726b19ae8ac8f6eea69a3943))
|
|
2015
2044
|
|
|
2016
|
-
-
|
|
2045
|
+
- Ship the tests, docs and COPYING file in the sdist
|
|
2017
2046
|
([#1142](https://github.com/python-zeroconf/python-zeroconf/pull/1142),
|
|
2018
2047
|
[`da10a3b`](https://github.com/python-zeroconf/python-zeroconf/commit/da10a3b2827cee0719d3bb9152ae897f061c6e2e))
|
|
2019
2048
|
|
|
2020
|
-
feat: Include tests and docs in sdist archives
|
|
2021
|
-
|
|
2022
|
-
Include documentation and test files in source distributions, in order to make them more useful for
|
|
2023
|
-
packagers (Linux distributions, Conda). Testing is an important part of packaging process, and at
|
|
2024
|
-
least Gentoo users have requested offline documentation for Python packages. Furthermore, the
|
|
2025
|
-
COPYING file was missing from sdist, even though it was referenced in README.
|
|
2026
|
-
|
|
2027
2049
|
- Small cleanups to cache cleanup interval
|
|
2028
2050
|
([#1146](https://github.com/python-zeroconf/python-zeroconf/pull/1146),
|
|
2029
2051
|
[`b434b60`](https://github.com/python-zeroconf/python-zeroconf/commit/b434b60f14ebe8f114b7b19bb4f54081c8ae0173))
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
python-zeroconf is distributed under the GNU Lesser General Public
|
|
2
|
+
License, version 2.1 or later. The full license text follows below the
|
|
3
|
+
separator.
|
|
4
|
+
|
|
5
|
+
Historical copyright notices, preserved from the original per file
|
|
6
|
+
headers:
|
|
7
|
+
|
|
8
|
+
Copyright 2003 Paul Scott-Murphy
|
|
9
|
+
Copyright 2014 William McBrine
|
|
10
|
+
Copyright 2014-2021 Jakub Stasiak
|
|
11
|
+
Copyright 2020-2026 J. Nick Koston
|
|
12
|
+
|
|
13
|
+
Other contributions are copyright their respective authors; the
|
|
14
|
+
complete record is in the project's git history.
|
|
15
|
+
|
|
16
|
+
----------------------------------------------------------------------
|
|
17
|
+
|
|
1
18
|
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
19
|
Version 2.1, February 1999
|
|
3
20
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: zeroconf
|
|
3
|
-
Version: 0.151.
|
|
3
|
+
Version: 0.151.3
|
|
4
4
|
Summary: A pure python implementation of multicast DNS service discovery
|
|
5
5
|
License-Expression: LGPL-2.1-or-later
|
|
6
6
|
License-File: COPYING
|
|
7
|
-
Author:
|
|
7
|
+
Author: The python-zeroconf authors
|
|
8
|
+
Maintainer: J. Nick Koston
|
|
9
|
+
Maintainer-email: nick@koston.org
|
|
8
10
|
Requires-Python: >=3.10
|
|
9
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
12
|
Classifier: Intended Audience :: Developers
|
|
@@ -50,21 +52,9 @@ python-zeroconf
|
|
|
50
52
|
|
|
51
53
|
`Documentation <https://python-zeroconf.readthedocs.io/en/latest/>`_.
|
|
52
54
|
|
|
53
|
-
This is fork of pyzeroconf,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
The original William McBrine's fork note::
|
|
58
|
-
|
|
59
|
-
This fork is used in all of my TiVo-related projects: HME for Python
|
|
60
|
-
(and therefore HME/VLC), Network Remote, Remote Proxy, and pyTivo.
|
|
61
|
-
Before this, I was tracking the changes for zeroconf.py in three
|
|
62
|
-
separate repos. I figured I should have an authoritative source.
|
|
63
|
-
|
|
64
|
-
Although I make changes based on my experience with TiVos, I expect that
|
|
65
|
-
they're generally applicable. This version also includes patches found
|
|
66
|
-
on the now-defunct (?) Launchpad repo of pyzeroconf, and elsewhere
|
|
67
|
-
around the net -- not always well-documented, sorry.
|
|
55
|
+
This project is a fork of pyzeroconf, originally by Paul Scott-Murphy
|
|
56
|
+
(https://github.com/paulsm/pyzeroconf), modified by William McBrine
|
|
57
|
+
(https://github.com/wmcbrine/pyzeroconf).
|
|
68
58
|
|
|
69
59
|
Compatible with:
|
|
70
60
|
|
|
@@ -130,33 +120,28 @@ The easiest way to install python-zeroconf is using pip::
|
|
|
130
120
|
How do I use it?
|
|
131
121
|
================
|
|
132
122
|
|
|
133
|
-
Here's
|
|
123
|
+
Here's how to discover services:
|
|
134
124
|
|
|
135
125
|
.. code-block:: python
|
|
136
126
|
|
|
137
127
|
from zeroconf import ServiceBrowser, ServiceListener, Zeroconf
|
|
138
128
|
|
|
139
129
|
|
|
140
|
-
class
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
print(f"
|
|
130
|
+
class EventLogger(ServiceListener):
|
|
131
|
+
def add_service(self, zc: Zeroconf, type_: str, name: str) -> None:
|
|
132
|
+
info = zc.get_service_info(type_, name)
|
|
133
|
+
print(f"discovered {name}: {info}")
|
|
144
134
|
|
|
145
135
|
def remove_service(self, zc: Zeroconf, type_: str, name: str) -> None:
|
|
146
|
-
print(f"
|
|
136
|
+
print(f"lost {name}")
|
|
147
137
|
|
|
148
|
-
def
|
|
149
|
-
|
|
150
|
-
print(f"Service {name} added, service info: {info}")
|
|
138
|
+
def update_service(self, zc: Zeroconf, type_: str, name: str) -> None:
|
|
139
|
+
print(f"refreshed {name}")
|
|
151
140
|
|
|
152
141
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
try:
|
|
157
|
-
input("Press enter to exit...\n\n")
|
|
158
|
-
finally:
|
|
159
|
-
zeroconf.close()
|
|
142
|
+
with Zeroconf() as zc:
|
|
143
|
+
ServiceBrowser(zc, "_http._tcp.local.", EventLogger())
|
|
144
|
+
input("browsing, press enter to stop\n")
|
|
160
145
|
|
|
161
146
|
.. note::
|
|
162
147
|
|
|
@@ -164,7 +149,7 @@ Here's an example of browsing for a service:
|
|
|
164
149
|
If you want to customize that you need to specify ``interfaces`` argument when
|
|
165
150
|
constructing ``Zeroconf`` object (see the code for details).
|
|
166
151
|
|
|
167
|
-
|
|
152
|
+
To see which service types are present on the network, try:
|
|
168
153
|
|
|
169
154
|
.. code-block:: python
|
|
170
155
|
|
|
@@ -20,21 +20,9 @@ python-zeroconf
|
|
|
20
20
|
|
|
21
21
|
`Documentation <https://python-zeroconf.readthedocs.io/en/latest/>`_.
|
|
22
22
|
|
|
23
|
-
This is fork of pyzeroconf,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
The original William McBrine's fork note::
|
|
28
|
-
|
|
29
|
-
This fork is used in all of my TiVo-related projects: HME for Python
|
|
30
|
-
(and therefore HME/VLC), Network Remote, Remote Proxy, and pyTivo.
|
|
31
|
-
Before this, I was tracking the changes for zeroconf.py in three
|
|
32
|
-
separate repos. I figured I should have an authoritative source.
|
|
33
|
-
|
|
34
|
-
Although I make changes based on my experience with TiVos, I expect that
|
|
35
|
-
they're generally applicable. This version also includes patches found
|
|
36
|
-
on the now-defunct (?) Launchpad repo of pyzeroconf, and elsewhere
|
|
37
|
-
around the net -- not always well-documented, sorry.
|
|
23
|
+
This project is a fork of pyzeroconf, originally by Paul Scott-Murphy
|
|
24
|
+
(https://github.com/paulsm/pyzeroconf), modified by William McBrine
|
|
25
|
+
(https://github.com/wmcbrine/pyzeroconf).
|
|
38
26
|
|
|
39
27
|
Compatible with:
|
|
40
28
|
|
|
@@ -100,33 +88,28 @@ The easiest way to install python-zeroconf is using pip::
|
|
|
100
88
|
How do I use it?
|
|
101
89
|
================
|
|
102
90
|
|
|
103
|
-
Here's
|
|
91
|
+
Here's how to discover services:
|
|
104
92
|
|
|
105
93
|
.. code-block:: python
|
|
106
94
|
|
|
107
95
|
from zeroconf import ServiceBrowser, ServiceListener, Zeroconf
|
|
108
96
|
|
|
109
97
|
|
|
110
|
-
class
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
print(f"
|
|
98
|
+
class EventLogger(ServiceListener):
|
|
99
|
+
def add_service(self, zc: Zeroconf, type_: str, name: str) -> None:
|
|
100
|
+
info = zc.get_service_info(type_, name)
|
|
101
|
+
print(f"discovered {name}: {info}")
|
|
114
102
|
|
|
115
103
|
def remove_service(self, zc: Zeroconf, type_: str, name: str) -> None:
|
|
116
|
-
print(f"
|
|
104
|
+
print(f"lost {name}")
|
|
117
105
|
|
|
118
|
-
def
|
|
119
|
-
|
|
120
|
-
print(f"Service {name} added, service info: {info}")
|
|
106
|
+
def update_service(self, zc: Zeroconf, type_: str, name: str) -> None:
|
|
107
|
+
print(f"refreshed {name}")
|
|
121
108
|
|
|
122
109
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
try:
|
|
127
|
-
input("Press enter to exit...\n\n")
|
|
128
|
-
finally:
|
|
129
|
-
zeroconf.close()
|
|
110
|
+
with Zeroconf() as zc:
|
|
111
|
+
ServiceBrowser(zc, "_http._tcp.local.", EventLogger())
|
|
112
|
+
input("browsing, press enter to stop\n")
|
|
130
113
|
|
|
131
114
|
.. note::
|
|
132
115
|
|
|
@@ -134,7 +117,7 @@ Here's an example of browsing for a service:
|
|
|
134
117
|
If you want to customize that you need to specify ``interfaces`` argument when
|
|
135
118
|
constructing ``Zeroconf`` object (see the code for details).
|
|
136
119
|
|
|
137
|
-
|
|
120
|
+
To see which service types are present on the network, try:
|
|
138
121
|
|
|
139
122
|
.. code-block:: python
|
|
140
123
|
|
|
@@ -4,15 +4,15 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "zeroconf"
|
|
7
|
-
version = "0.151.
|
|
7
|
+
version = "0.151.3"
|
|
8
8
|
license = "LGPL-2.1-or-later"
|
|
9
9
|
description = "A pure python implementation of multicast DNS service discovery"
|
|
10
10
|
readme = "README.rst"
|
|
11
11
|
authors = [
|
|
12
|
-
{ name = "
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
{ name = "J. Nick Koston" },
|
|
12
|
+
{ name = "The python-zeroconf authors" }, # full history in COPYING and git
|
|
13
|
+
]
|
|
14
|
+
maintainers = [
|
|
15
|
+
{ name = "J. Nick Koston", email = "nick@koston.org" },
|
|
16
16
|
]
|
|
17
17
|
requires-python = ">=3.10"
|
|
18
18
|
|
|
@@ -88,7 +88,7 @@ pytest = ">=9.1.1,<10.0"
|
|
|
88
88
|
pytest-cov = ">=4,<8"
|
|
89
89
|
pytest-asyncio = ">=1.4.0,<1.5.0"
|
|
90
90
|
cython = "^3.3.0"
|
|
91
|
-
setuptools = ">=
|
|
91
|
+
setuptools = ">=84.0.0,<85.0.0"
|
|
92
92
|
pytest-timeout = "^2.1.0"
|
|
93
93
|
pytest-codspeed = ">=5.0.3,<6.0"
|
|
94
94
|
blockbuster = ">=1.5.27,<2.0.0"
|
|
@@ -183,6 +183,9 @@ select = [
|
|
|
183
183
|
"examples/**/*" = [
|
|
184
184
|
"T201", # intended
|
|
185
185
|
]
|
|
186
|
+
"scripts/**/*" = [
|
|
187
|
+
"T201", # intended
|
|
188
|
+
]
|
|
186
189
|
"setup.py" = ["D100"]
|
|
187
190
|
"conftest.py" = ["D100"]
|
|
188
191
|
"docs/conf.py" = ["D100"]
|
|
@@ -204,7 +207,6 @@ good-names = [
|
|
|
204
207
|
"t",
|
|
205
208
|
"wr",
|
|
206
209
|
"zc",
|
|
207
|
-
"_GLOBAL_DONE",
|
|
208
210
|
]
|
|
209
211
|
|
|
210
212
|
[tool.pylint."MESSAGES CONTROL"]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
from setuptools import setup
|
|
3
|
+
|
|
4
|
+
package_dir = \
|
|
5
|
+
{'': 'src'}
|
|
6
|
+
|
|
7
|
+
packages = \
|
|
8
|
+
['zeroconf',
|
|
9
|
+
'zeroconf._handlers',
|
|
10
|
+
'zeroconf._protocol',
|
|
11
|
+
'zeroconf._services',
|
|
12
|
+
'zeroconf._utils']
|
|
13
|
+
|
|
14
|
+
package_data = \
|
|
15
|
+
{'': ['*']}
|
|
16
|
+
|
|
17
|
+
install_requires = \
|
|
18
|
+
['ifaddr>=0.1.7']
|
|
19
|
+
|
|
20
|
+
setup_kwargs = {
|
|
21
|
+
'name': 'zeroconf',
|
|
22
|
+
'version': '0.151.3',
|
|
23
|
+
'description': 'A pure python implementation of multicast DNS service discovery',
|
|
24
|
+
'long_description': 'python-zeroconf\n===============\n\n.. image:: https://github.com/python-zeroconf/python-zeroconf/workflows/CI/badge.svg\n :target: https://github.com/python-zeroconf/python-zeroconf?query=workflow%3ACI+branch%3Amaster\n\n.. image:: https://img.shields.io/pypi/v/zeroconf.svg\n :target: https://pypi.python.org/pypi/zeroconf\n\n.. image:: https://codecov.io/gh/python-zeroconf/python-zeroconf/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/python-zeroconf/python-zeroconf\n\n.. image:: https://img.shields.io/endpoint?url=https://codspeed.io/badge.json\n :target: https://codspeed.io/python-zeroconf/python-zeroconf\n :alt: Codspeed.io status for python-zeroconf\n\n.. image:: https://readthedocs.org/projects/python-zeroconf/badge/?version=latest\n :target: https://python-zeroconf.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n`Documentation <https://python-zeroconf.readthedocs.io/en/latest/>`_.\n\nThis project is a fork of pyzeroconf, originally by Paul Scott-Murphy\n(https://github.com/paulsm/pyzeroconf), modified by William McBrine\n(https://github.com/wmcbrine/pyzeroconf).\n\nCompatible with:\n\n* Bonjour\n* Avahi\n\nCompared to some other Zeroconf/Bonjour/Avahi Python packages, python-zeroconf:\n\n* isn\'t tied to Bonjour or Avahi\n* doesn\'t use D-Bus\n* doesn\'t force you to use particular event loop or Twisted (asyncio is used under the hood but not required)\n* is pip-installable\n* has PyPI distribution\n* has an optional cython extension for performance (pure python is supported as well)\n\nPython compatibility\n--------------------\n\n* CPython 3.10+\n* PyPy 3.10+\n\nVersioning\n----------\n\nThis project uses semantic versioning.\n\nStatus\n------\n\nThis project is actively maintained.\n\nTraffic Reduction\n-----------------\n\nBefore version 0.32, most traffic reduction techniques described in https://datatracker.ietf.org/doc/html/rfc6762#section-7\nwhere not implemented which could lead to excessive network traffic. It is highly recommended that version 0.32 or later\nis used if this is a concern.\n\nIPv6 support\n------------\n\nIPv6 support is relatively new and currently limited, specifically:\n\n* `InterfaceChoice.All` is an alias for `InterfaceChoice.Default` on non-POSIX\n systems.\n* Dual-stack IPv6 sockets are used, which may not be supported everywhere (some\n BSD variants do not have them).\n* Listening on localhost (`::1`) does not work. Help with understanding why is\n appreciated.\n\nHow to get python-zeroconf?\n===========================\n\n* PyPI page https://pypi.org/project/zeroconf/\n* GitHub project https://github.com/python-zeroconf/python-zeroconf\n\nThe easiest way to install python-zeroconf is using pip::\n\n pip install zeroconf\n\n\n\nHow do I use it?\n================\n\nHere\'s how to discover services:\n\n.. code-block:: python\n\n from zeroconf import ServiceBrowser, ServiceListener, Zeroconf\n\n\n class EventLogger(ServiceListener):\n def add_service(self, zc: Zeroconf, type_: str, name: str) -> None:\n info = zc.get_service_info(type_, name)\n print(f"discovered {name}: {info}")\n\n def remove_service(self, zc: Zeroconf, type_: str, name: str) -> None:\n print(f"lost {name}")\n\n def update_service(self, zc: Zeroconf, type_: str, name: str) -> None:\n print(f"refreshed {name}")\n\n\n with Zeroconf() as zc:\n ServiceBrowser(zc, "_http._tcp.local.", EventLogger())\n input("browsing, press enter to stop\\n")\n\n.. note::\n\n Discovery and service registration use *all* available network interfaces by default.\n If you want to customize that you need to specify ``interfaces`` argument when\n constructing ``Zeroconf`` object (see the code for details).\n\nTo see which service types are present on the network, try:\n\n.. code-block:: python\n\n from zeroconf import ZeroconfServiceTypes\n print(\'\\n\'.join(ZeroconfServiceTypes.find()))\n\nSee examples directory for more.\n\nChangelog\n=========\n\n`Changelog <CHANGELOG.md>`_\n\nLicense\n=======\n\nGNU Lesser General Public License v2.1 or later (LGPL-2.1-or-later).\n\nThe full text of LGPL 2.1 is included in the `COPYING <COPYING>`_ file.\nYou may, at your option, use this library under the terms of any later\nversion of the LGPL published by the Free Software Foundation. The\ncanonical SPDX identifier for this project is ``LGPL-2.1-or-later``, as\ndeclared in ``pyproject.toml``.\n',
|
|
25
|
+
'author': 'The python-zeroconf authors',
|
|
26
|
+
'author_email': 'None',
|
|
27
|
+
'maintainer': 'J. Nick Koston',
|
|
28
|
+
'maintainer_email': 'nick@koston.org',
|
|
29
|
+
'url': 'https://github.com/python-zeroconf/python-zeroconf',
|
|
30
|
+
'package_dir': package_dir,
|
|
31
|
+
'packages': packages,
|
|
32
|
+
'package_data': package_data,
|
|
33
|
+
'install_requires': install_requires,
|
|
34
|
+
'python_requires': '>=3.10',
|
|
35
|
+
}
|
|
36
|
+
from build_ext import *
|
|
37
|
+
build(setup_kwargs)
|
|
38
|
+
|
|
39
|
+
setup(**setup_kwargs)
|
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine
|
|
1
|
+
"""A pure python implementation of multicast DNS service discovery.
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
This library is free software; you can redistribute it and/or
|
|
8
|
-
modify it under the terms of the GNU Lesser General Public
|
|
9
|
-
License as published by the Free Software Foundation; either
|
|
10
|
-
version 2.1 of the License, or (at your option) any later version.
|
|
11
|
-
|
|
12
|
-
This library is distributed in the hope that it will be useful,
|
|
13
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
15
|
-
Lesser General Public License for more details.
|
|
16
|
-
|
|
17
|
-
You should have received a copy of the GNU Lesser General Public
|
|
18
|
-
License along with this library; if not, write to the Free Software
|
|
19
|
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
|
|
20
|
-
USA
|
|
3
|
+
Licensed under LGPL-2.1-or-later; see COPYING for details. This file is
|
|
4
|
+
part of a continuously modified work; modification dates are recorded
|
|
5
|
+
in the project's git history.
|
|
21
6
|
"""
|
|
22
7
|
|
|
23
8
|
from __future__ import annotations
|
|
@@ -86,9 +71,9 @@ from ._utils.time import ( # noqa # import needed for backwards compat
|
|
|
86
71
|
millis_to_seconds,
|
|
87
72
|
)
|
|
88
73
|
|
|
89
|
-
__author__ = "
|
|
90
|
-
__maintainer__ = "
|
|
91
|
-
__version__ = "0.151.
|
|
74
|
+
__author__ = "The python-zeroconf authors" # full history in COPYING and git
|
|
75
|
+
__maintainer__ = "J. Nick Koston <nick@koston.org>"
|
|
76
|
+
__version__ = "0.151.3"
|
|
92
77
|
__license__ = "LGPL"
|
|
93
78
|
|
|
94
79
|
|