zeroconf 0.151.2__tar.gz → 0.151.5__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.
Files changed (115) hide show
  1. {zeroconf-0.151.2 → zeroconf-0.151.5}/CHANGELOG.md +49 -9
  2. {zeroconf-0.151.2 → zeroconf-0.151.5}/COPYING +17 -0
  3. {zeroconf-0.151.2 → zeroconf-0.151.5}/PKG-INFO +20 -34
  4. {zeroconf-0.151.2 → zeroconf-0.151.5}/README.rst +15 -32
  5. {zeroconf-0.151.2 → zeroconf-0.151.5}/pyproject.toml +12 -10
  6. zeroconf-0.151.5/setup.py +39 -0
  7. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/__init__.py +7 -22
  8. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_cache.py +158 -191
  9. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_core.py +366 -428
  10. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_dns.py +297 -317
  11. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_engine.py +119 -134
  12. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_exceptions.py +21 -36
  13. zeroconf-0.151.5/src/zeroconf/_handlers/__init__.py +8 -0
  14. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_handlers/answers.py +5 -20
  15. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_handlers/multicast_outgoing_queue.py +11 -26
  16. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_handlers/query_handler.py +163 -181
  17. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_handlers/record_manager.py +39 -74
  18. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_history.py +18 -33
  19. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_listener.py +129 -149
  20. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_logger.py +15 -30
  21. zeroconf-0.151.5/src/zeroconf/_protocol/__init__.py +8 -0
  22. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_protocol/incoming.py +252 -273
  23. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_protocol/outgoing.pxd +5 -6
  24. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_protocol/outgoing.py +224 -253
  25. zeroconf-0.151.5/src/zeroconf/_record_update.py +33 -0
  26. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_services/__init__.py +5 -20
  27. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_services/browser.py +184 -220
  28. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_services/info.pxd +3 -1
  29. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_services/info.py +592 -645
  30. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_services/registry.py +29 -44
  31. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_services/types.py +11 -26
  32. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_transport.py +5 -20
  33. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_updates.py +15 -30
  34. zeroconf-0.151.5/src/zeroconf/_utils/__init__.py +8 -0
  35. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_utils/asyncio.py +5 -20
  36. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_utils/ipaddress.py +27 -42
  37. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_utils/name.py +7 -22
  38. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_utils/net.py +16 -32
  39. zeroconf-0.151.5/src/zeroconf/_utils/time.py +26 -0
  40. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/asyncio.py +83 -135
  41. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/const.py +38 -55
  42. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/__init__.py +92 -22
  43. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_registry.py +1 -1
  44. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/conftest.py +6 -3
  45. zeroconf-0.151.5/tests/services/__init__.py +8 -0
  46. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/services/test_browser.py +50 -153
  47. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/services/test_info.py +153 -229
  48. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/services/test_registry.py +27 -116
  49. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/services/test_types.py +19 -45
  50. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_asyncio.py +108 -328
  51. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_core.py +266 -318
  52. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_dns.py +23 -7
  53. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_engine.py +26 -6
  54. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_handlers.py +281 -578
  55. zeroconf-0.151.5/tests/test_init.py +159 -0
  56. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_interface_update.py +124 -124
  57. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_listener.py +8 -20
  58. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_protocol.py +446 -469
  59. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_services.py +7 -16
  60. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_updates.py +3 -17
  61. zeroconf-0.151.5/tests/utils/__init__.py +8 -0
  62. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/utils/test_name.py +2 -2
  63. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/utils/test_net.py +29 -0
  64. zeroconf-0.151.2/setup.py +0 -39
  65. zeroconf-0.151.2/src/zeroconf/_handlers/__init__.py +0 -23
  66. zeroconf-0.151.2/src/zeroconf/_protocol/__init__.py +0 -23
  67. zeroconf-0.151.2/src/zeroconf/_record_update.py +0 -48
  68. zeroconf-0.151.2/src/zeroconf/_utils/__init__.py +0 -23
  69. zeroconf-0.151.2/src/zeroconf/_utils/time.py +0 -43
  70. zeroconf-0.151.2/tests/services/__init__.py +0 -23
  71. zeroconf-0.151.2/tests/test_init.py +0 -193
  72. zeroconf-0.151.2/tests/utils/__init__.py +0 -23
  73. {zeroconf-0.151.2 → zeroconf-0.151.5}/build_ext.py +0 -0
  74. {zeroconf-0.151.2 → zeroconf-0.151.5}/docs/Makefile +0 -0
  75. {zeroconf-0.151.2 → zeroconf-0.151.5}/docs/_ext/zeroconfautodocfix.py +0 -0
  76. {zeroconf-0.151.2 → zeroconf-0.151.5}/docs/api.rst +0 -0
  77. {zeroconf-0.151.2 → zeroconf-0.151.5}/docs/conf.py +0 -0
  78. {zeroconf-0.151.2 → zeroconf-0.151.5}/docs/index.rst +0 -0
  79. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_cache.pxd +0 -0
  80. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_dns.pxd +0 -0
  81. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_handlers/answers.pxd +0 -0
  82. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_handlers/multicast_outgoing_queue.pxd +0 -0
  83. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_handlers/query_handler.pxd +0 -0
  84. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_handlers/record_manager.pxd +0 -0
  85. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_history.pxd +0 -0
  86. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_listener.pxd +0 -0
  87. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_protocol/incoming.pxd +0 -0
  88. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_record_update.pxd +0 -0
  89. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_services/__init__.pxd +0 -0
  90. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_services/browser.pxd +0 -0
  91. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_services/registry.pxd +0 -0
  92. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_updates.pxd +0 -0
  93. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_utils/ipaddress.pxd +0 -0
  94. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/_utils/time.pxd +0 -0
  95. {zeroconf-0.151.2 → zeroconf-0.151.5}/src/zeroconf/py.typed +0 -0
  96. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/__init__.py +0 -0
  97. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/helpers.py +0 -0
  98. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_cache.py +0 -0
  99. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_cache_bound.py +0 -0
  100. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_cache_mark_expire.py +0 -0
  101. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_incoming.py +0 -0
  102. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_ipaddress.py +0 -0
  103. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_listener_dedup.py +0 -0
  104. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_mark_seen.py +0 -0
  105. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_outgoing.py +0 -0
  106. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_send.py +0 -0
  107. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/benchmarks/test_txt_properties.py +0 -0
  108. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_cache.py +0 -0
  109. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_circular_imports.py +0 -0
  110. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_exceptions.py +0 -0
  111. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_fuzz_incoming.py +0 -0
  112. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_history.py +0 -0
  113. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/test_logger.py +0 -0
  114. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/utils/test_asyncio.py +0 -0
  115. {zeroconf-0.151.2 → zeroconf-0.151.5}/tests/utils/test_ipaddress.py +0 -0
@@ -2,6 +2,53 @@
2
2
 
3
3
  <!-- version list -->
4
4
 
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
+
23
+ ## v0.151.3 (2026-08-30)
24
+
25
+ ### Bug Fixes
26
+
27
+ - Correct the recursion available header flag to the rfc 1035 value
28
+ ([#1893](https://github.com/python-zeroconf/python-zeroconf/pull/1893),
29
+ [`07e3812`](https://github.com/python-zeroconf/python-zeroconf/commit/07e38121a30ecd3c19690ffc956dead8160e6c46))
30
+
31
+ ### Refactoring
32
+
33
+ - Compute probe pacing from fresh clock reads
34
+ ([#1888](https://github.com/python-zeroconf/python-zeroconf/pull/1888),
35
+ [`7737108`](https://github.com/python-zeroconf/python-zeroconf/commit/773710807a0159dc49de2a8c875a63d1085df604))
36
+
37
+ - Compute service info request pacing from fresh clock reads
38
+ ([#1895](https://github.com/python-zeroconf/python-zeroconf/pull/1895),
39
+ [`49aa15f`](https://github.com/python-zeroconf/python-zeroconf/commit/49aa15f639bc50f05f0f88c8153463a7a42c06ef))
40
+
41
+ ### Testing
42
+
43
+ - Fix flaky test_service_browser_expire_callbacks
44
+ ([#1879](https://github.com/python-zeroconf/python-zeroconf/pull/1879),
45
+ [`6d061a4`](https://github.com/python-zeroconf/python-zeroconf/commit/6d061a4fb3b3557bafc37ef951c5214f7b24a125))
46
+
47
+ - Make test_qu_response deterministic by injecting the announcement
48
+ ([#1845](https://github.com/python-zeroconf/python-zeroconf/pull/1845),
49
+ [`10db10a`](https://github.com/python-zeroconf/python-zeroconf/commit/10db10a8b5db3cbd6e6c6718a6cbb8830f4b9d07))
50
+
51
+
5
52
  ## v0.151.2 (2026-08-29)
6
53
 
7
54
  ### Bug Fixes
@@ -415,7 +462,7 @@
415
462
 
416
463
  ### Build System
417
464
 
418
- - Adjust actions checkout ref parameter on release
465
+ - Use an explicit checkout ref in the release workflow
419
466
  ([#1669](https://github.com/python-zeroconf/python-zeroconf/pull/1669),
420
467
  [`bc8ec8d`](https://github.com/python-zeroconf/python-zeroconf/commit/bc8ec8d59d875522f75901644d423d30d803a030))
421
468
 
@@ -2013,17 +2060,10 @@ This also revealed that we do not send NSEC records in the initial broadcast. Th
2013
2060
  ([#1145](https://github.com/python-zeroconf/python-zeroconf/pull/1145),
2014
2061
  [`524494e`](https://github.com/python-zeroconf/python-zeroconf/commit/524494edd49bd049726b19ae8ac8f6eea69a3943))
2015
2062
 
2016
- - Include tests and docs in sdist archives
2063
+ - Ship the tests, docs and COPYING file in the sdist
2017
2064
  ([#1142](https://github.com/python-zeroconf/python-zeroconf/pull/1142),
2018
2065
  [`da10a3b`](https://github.com/python-zeroconf/python-zeroconf/commit/da10a3b2827cee0719d3bb9152ae897f061c6e2e))
2019
2066
 
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
2067
  - Small cleanups to cache cleanup interval
2028
2068
  ([#1146](https://github.com/python-zeroconf/python-zeroconf/pull/1146),
2029
2069
  [`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.2
3
+ Version: 0.151.5
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: Paul Scott-Murphy
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
@@ -18,6 +20,7 @@ Classifier: Programming Language :: Python :: 3.11
18
20
  Classifier: Programming Language :: Python :: 3.12
19
21
  Classifier: Programming Language :: Python :: 3.13
20
22
  Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Programming Language :: Python :: 3.15
21
24
  Classifier: Programming Language :: Python :: Implementation :: CPython
22
25
  Classifier: Programming Language :: Python :: Implementation :: PyPy
23
26
  Classifier: Topic :: Software Development :: Libraries
@@ -50,21 +53,9 @@ python-zeroconf
50
53
 
51
54
  `Documentation <https://python-zeroconf.readthedocs.io/en/latest/>`_.
52
55
 
53
- This is fork of pyzeroconf, Multicast DNS Service Discovery for Python,
54
- originally by Paul Scott-Murphy (https://github.com/paulsm/pyzeroconf),
55
- modified by William McBrine (https://github.com/wmcbrine/pyzeroconf).
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.
56
+ This project is a fork of pyzeroconf, originally by Paul Scott-Murphy
57
+ (https://github.com/paulsm/pyzeroconf), modified by William McBrine
58
+ (https://github.com/wmcbrine/pyzeroconf).
68
59
 
69
60
  Compatible with:
70
61
 
@@ -130,33 +121,28 @@ The easiest way to install python-zeroconf is using pip::
130
121
  How do I use it?
131
122
  ================
132
123
 
133
- Here's an example of browsing for a service:
124
+ Here's how to discover services:
134
125
 
135
126
  .. code-block:: python
136
127
 
137
128
  from zeroconf import ServiceBrowser, ServiceListener, Zeroconf
138
129
 
139
130
 
140
- class MyListener(ServiceListener):
141
-
142
- def update_service(self, zc: Zeroconf, type_: str, name: str) -> None:
143
- print(f"Service {name} updated")
131
+ class EventLogger(ServiceListener):
132
+ def add_service(self, zc: Zeroconf, type_: str, name: str) -> None:
133
+ info = zc.get_service_info(type_, name)
134
+ print(f"discovered {name}: {info}")
144
135
 
145
136
  def remove_service(self, zc: Zeroconf, type_: str, name: str) -> None:
146
- print(f"Service {name} removed")
137
+ print(f"lost {name}")
147
138
 
148
- def add_service(self, zc: Zeroconf, type_: str, name: str) -> None:
149
- info = zc.get_service_info(type_, name)
150
- print(f"Service {name} added, service info: {info}")
139
+ def update_service(self, zc: Zeroconf, type_: str, name: str) -> None:
140
+ print(f"refreshed {name}")
151
141
 
152
142
 
153
- zeroconf = Zeroconf()
154
- listener = MyListener()
155
- browser = ServiceBrowser(zeroconf, "_http._tcp.local.", listener)
156
- try:
157
- input("Press enter to exit...\n\n")
158
- finally:
159
- zeroconf.close()
143
+ with Zeroconf() as zc:
144
+ ServiceBrowser(zc, "_http._tcp.local.", EventLogger())
145
+ input("browsing, press enter to stop\n")
160
146
 
161
147
  .. note::
162
148
 
@@ -164,7 +150,7 @@ Here's an example of browsing for a service:
164
150
  If you want to customize that you need to specify ``interfaces`` argument when
165
151
  constructing ``Zeroconf`` object (see the code for details).
166
152
 
167
- If you don't know the name of the service you need to browse for, try:
153
+ To see which service types are present on the network, try:
168
154
 
169
155
  .. code-block:: python
170
156
 
@@ -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, Multicast DNS Service Discovery for Python,
24
- originally by Paul Scott-Murphy (https://github.com/paulsm/pyzeroconf),
25
- modified by William McBrine (https://github.com/wmcbrine/pyzeroconf).
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 an example of browsing for a service:
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 MyListener(ServiceListener):
111
-
112
- def update_service(self, zc: Zeroconf, type_: str, name: str) -> None:
113
- print(f"Service {name} updated")
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"Service {name} removed")
104
+ print(f"lost {name}")
117
105
 
118
- def add_service(self, zc: Zeroconf, type_: str, name: str) -> None:
119
- info = zc.get_service_info(type_, name)
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
- zeroconf = Zeroconf()
124
- listener = MyListener()
125
- browser = ServiceBrowser(zeroconf, "_http._tcp.local.", listener)
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
- If you don't know the name of the service you need to browse for, try:
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.2"
7
+ version = "0.151.5"
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 = "Paul Scott-Murphy" },
13
- { name = "William McBrine" },
14
- { name = "Jakub Stasiak" },
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
 
@@ -56,7 +56,7 @@ version_toml = ["pyproject.toml:project.version"]
56
56
  version_variables = [
57
57
  "src/zeroconf/__init__.py:__version__"
58
58
  ]
59
- build_command = "pip install poetry && poetry build"
59
+ build_command = "pip install poetry && poetry build --format sdist"
60
60
  tag_format = "{version}"
61
61
  allow_zero_version = true
62
62
 
@@ -88,11 +88,11 @@ 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 = ">=83.0.0,<84.0.0"
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
- blockbuster = ">=1.5.27,<2.0.0"
95
- hypothesis = {version = "^6.165.10", markers = "implementation_name == 'cpython'"}
94
+ blockbuster = ">=1.5.28,<2.0.0"
95
+ hypothesis = {version = "^6.168.0", markers = "implementation_name == 'cpython'"}
96
96
 
97
97
  [tool.poetry.group.docs.dependencies]
98
98
  sphinx = "^7.4.7 || ^8.1.3"
@@ -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.5',
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
- """Multicast DNS Service Discovery for Python, v0.14-wmcbrine
2
- Copyright 2003 Paul Scott-Murphy, 2014 William McBrine
1
+ """A pure python implementation of multicast DNS service discovery.
3
2
 
4
- This module provides a framework for the use of DNS Service Discovery
5
- using IP multicast.
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__ = "Paul Scott-Murphy, William McBrine"
90
- __maintainer__ = "Jakub Stasiak <jakub@stasiak.at>"
91
- __version__ = "0.151.2"
74
+ __author__ = "The python-zeroconf authors" # full history in COPYING and git
75
+ __maintainer__ = "J. Nick Koston <nick@koston.org>"
76
+ __version__ = "0.151.5"
92
77
  __license__ = "LGPL"
93
78
 
94
79