| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -415,7 +415,7 @@ | |||
| 415 | 415 | ||
| 416 | 416 | ### Build System | |
| 417 | 417 | ||
| 418 | - - Adjust actions checkout ref parameter on release | ||
| 418 | + - Use an explicit checkout ref in the release workflow | ||
| 419 | 419 | ([#1669](https://github.com/python-zeroconf/python-zeroconf/pull/1669), | |
| 420 | 420 | [`bc8ec8d`](https://github.com/python-zeroconf/python-zeroconf/commit/bc8ec8d59d875522f75901644d423d30d803a030)) | |
| 421 | 421 | ||
@@ -2013,17 +2013,10 @@ This also revealed that we do not send NSEC records in the initial broadcast. Th | |||
| 2013 | 2013 | ([#1145](https://github.com/python-zeroconf/python-zeroconf/pull/1145), | |
| 2014 | 2014 | [`524494e`](https://github.com/python-zeroconf/python-zeroconf/commit/524494edd49bd049726b19ae8ac8f6eea69a3943)) | |
| 2015 | 2015 | ||
| 2016 | - - Include tests and docs in sdist archives | ||
| 2016 | + - Ship the tests, docs and COPYING file in the sdist | ||
| 2017 | 2017 | ([#1142](https://github.com/python-zeroconf/python-zeroconf/pull/1142), | |
| 2018 | 2018 | [`da10a3b`](https://github.com/python-zeroconf/python-zeroconf/commit/da10a3b2827cee0719d3bb9152ae897f061c6e2e)) | |
| 2019 | 2019 | ||
| 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 | 2020 | - Small cleanups to cache cleanup interval | |
| 2028 | 2021 | ([#1146](https://github.com/python-zeroconf/python-zeroconf/pull/1146), | |
| 2029 | 2022 | [`b434b60`](https://github.com/python-zeroconf/python-zeroconf/commit/b434b60f14ebe8f114b7b19bb4f54081c8ae0173)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,10 +9,10 @@ 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 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -170,7 +170,7 @@ def _fast_init(self, name: str, type_: _int, class_: _int) -> None: | |||
| 170 | 170 | ||
| 171 | 171 | ||
| 172 | 172 | class DNSRecord(DNSEntry): # noqa: PLW1641 | |
| 173 | - """A DNS entry that also carries a TTL and creation time.""" | ||
| 173 | + """Record layered on the entry identity with a TTL and creation time.""" | ||
| 174 | 174 | ||
| 175 | 175 | __slots__ = ("created", "ttl") | |
| 176 | 176 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -60,7 +60,7 @@ def service_type_name(type_: str, *, strict: bool = True) -> str: # pylint: dis | |||
| 60 | 60 | and anything else that may be represented using Net-Unicode. | |
| 61 | 61 | ||
| 62 | 62 | :param type_: Type, SubType or service name to validate | |
| 63 | - :return: fully qualified service name (eg: _http._tcp.local.) | ||
| 63 | + :return: the validated name, fully qualified (eg: _http._tcp.local.) | ||
| 64 | 64 | """ | |
| 65 | 65 | if len(type_) > 256: | |
| 66 | 66 | # https://datatracker.ietf.org/doc/html/rfc6763#section-7.2 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,7 +138,7 @@ async def test_async_service_registration(quick_timing: None) -> None: | |||
| 138 | 138 | ||
| 139 | 139 | calls = [] | |
| 140 | 140 | ||
| 141 | - class MyListener(ServiceListener): | ||
| 141 | + class EventStore(ServiceListener): | ||
| 142 | 142 | def add_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 143 | 143 | calls.append(("add", type, name)) | |
| 144 | 144 | ||
@@ -148,7 +148,7 @@ def remove_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |||
| 148 | 148 | def update_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 149 | 149 | calls.append(("update", type, name)) | |
| 150 | 150 | ||
| 151 | - listener = MyListener() | ||
| 151 | + listener = EventStore() | ||
| 152 | 152 | ||
| 153 | 153 | aiozc.zeroconf.add_service_listener(type_, listener) | |
| 154 | 154 | ||
@@ -193,7 +193,7 @@ async def test_async_service_registration_with_server_missing(quick_timing: None | |||
| 193 | 193 | ||
| 194 | 194 | calls = [] | |
| 195 | 195 | ||
| 196 | - class MyListener(ServiceListener): | ||
| 196 | + class EventStore(ServiceListener): | ||
| 197 | 197 | def add_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 198 | 198 | calls.append(("add", type, name)) | |
| 199 | 199 | ||
@@ -203,7 +203,7 @@ def remove_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |||
| 203 | 203 | def update_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 204 | 204 | calls.append(("update", type, name)) | |
| 205 | 205 | ||
| 206 | - listener = MyListener() | ||
| 206 | + listener = EventStore() | ||
| 207 | 207 | ||
| 208 | 208 | aiozc.zeroconf.add_service_listener(type_, listener) | |
| 209 | 209 | ||
@@ -252,7 +252,7 @@ async def test_async_service_registration_same_server_different_ports(quick_timi | |||
| 252 | 252 | ||
| 253 | 253 | calls = [] | |
| 254 | 254 | ||
| 255 | - class MyListener(ServiceListener): | ||
| 255 | + class EventStore(ServiceListener): | ||
| 256 | 256 | def add_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 257 | 257 | calls.append(("add", type, name)) | |
| 258 | 258 | ||
@@ -262,7 +262,7 @@ def remove_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |||
| 262 | 262 | def update_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 263 | 263 | calls.append(("update", type, name)) | |
| 264 | 264 | ||
| 265 | - listener = MyListener() | ||
| 265 | + listener = EventStore() | ||
| 266 | 266 | ||
| 267 | 267 | aiozc.zeroconf.add_service_listener(type_, listener) | |
| 268 | 268 | ||
@@ -310,7 +310,7 @@ async def test_async_service_registration_same_server_same_ports(quick_timing: N | |||
| 310 | 310 | ||
| 311 | 311 | calls = [] | |
| 312 | 312 | ||
| 313 | - class MyListener(ServiceListener): | ||
| 313 | + class EventStore(ServiceListener): | ||
| 314 | 314 | def add_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 315 | 315 | calls.append(("add", type, name)) | |
| 316 | 316 | ||
@@ -320,7 +320,7 @@ def remove_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |||
| 320 | 320 | def update_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 321 | 321 | calls.append(("update", type, name)) | |
| 322 | 322 | ||
| 323 | - listener = MyListener() | ||
| 323 | + listener = EventStore() | ||
| 324 | 324 | ||
| 325 | 325 | aiozc.zeroconf.add_service_listener(type_, listener) | |
| 326 | 326 | ||
@@ -432,7 +432,7 @@ async def test_async_tasks(quick_timing: None) -> None: | |||
| 432 | 432 | ||
| 433 | 433 | calls = [] | |
| 434 | 434 | ||
| 435 | - class MyListener(ServiceListener): | ||
| 435 | + class EventStore(ServiceListener): | ||
| 436 | 436 | def add_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 437 | 437 | calls.append(("add", type, name)) | |
| 438 | 438 | ||
@@ -442,7 +442,7 @@ def remove_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |||
| 442 | 442 | def update_service(self, zeroconf: Zeroconf, type: str, name: str) -> None: | |
| 443 | 443 | calls.append(("update", type, name)) | |
| 444 | 444 | ||
| 445 | - listener = MyListener() | ||
| 445 | + listener = EventStore() | ||
| 446 | 446 | aiozc.zeroconf.add_service_listener(type_, listener) | |
| 447 | 447 | ||
| 448 | 448 | desc = {"path": "/healthz/"} | |
@@ -609,7 +609,7 @@ async def test_async_service_browser(quick_timing: None) -> None: | |||
| 609 | 609 | ||
| 610 | 610 | calls = [] | |
| 611 | 611 | ||
| 612 | - class MyListener(ServiceListener): | ||
| 612 | + class EventStore(ServiceListener): | ||
| 613 | 613 | def add_service(self, aiozc: Zeroconf, type: str, name: str) -> None: | |
| 614 | 614 | calls.append(("add", type, name)) | |
| 615 | 615 | ||
@@ -619,7 +619,7 @@ def remove_service(self, aiozc: Zeroconf, type: str, name: str) -> None: | |||
| 619 | 619 | def update_service(self, aiozc: Zeroconf, type: str, name: str) -> None: | |
| 620 | 620 | calls.append(("update", type, name)) | |
| 621 | 621 | ||
| 622 | - listener = MyListener() | ||
| 622 | + listener = EventStore() | ||
| 623 | 623 | await aiozc.async_add_service_listener(type_, listener) | |
| 624 | 624 | ||
| 625 | 625 | desc = {"path": "/healthz/"} | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1208,7 +1208,7 @@ async def test_record_update_manager_add_listener_callsback_existing_records(): | |||
| 1208 | 1208 | zc: Zeroconf = aiozc.zeroconf | |
| 1209 | 1209 | updated = [] | |
| 1210 | 1210 | ||
| 1211 | - class MyListener(r.RecordUpdateListener): | ||
| 1211 | + class EventStore(r.RecordUpdateListener): | ||
| 1212 | 1212 | """A RecordUpdateListener that does not implement update_records.""" | |
| 1213 | 1213 | ||
| 1214 | 1214 | def async_update_records(self, zc: Zeroconf, now: float, records: list[r.RecordUpdate]) -> None: | |
@@ -1225,7 +1225,7 @@ def async_update_records(self, zc: Zeroconf, now: float, records: list[r.RecordU | |||
| 1225 | 1225 | ptr_record = info.dns_pointer() | |
| 1226 | 1226 | zc.cache.async_add_records([ptr_record, a_record, info.dns_text(), info.dns_service()]) | |
| 1227 | 1227 | ||
| 1228 | - listener = MyListener() | ||
| 1228 | + listener = EventStore() | ||
| 1229 | 1229 | ||
| 1230 | 1230 | zc.add_listener( | |
| 1231 | 1231 | listener, | |
@@ -1750,14 +1750,14 @@ async def test_add_listener_warns_when_not_using_record_update_listener(caplog): | |||
| 1750 | 1750 | zc: Zeroconf = aiozc.zeroconf | |
| 1751 | 1751 | updated = [] | |
| 1752 | 1752 | ||
| 1753 | - class MyListener: | ||
| 1753 | + class EventStore: | ||
| 1754 | 1754 | """A RecordUpdateListener that does not implement update_records.""" | |
| 1755 | 1755 | ||
| 1756 | 1756 | def async_update_records(self, zc: Zeroconf, now: float, records: list[r.RecordUpdate]) -> None: | |
| 1757 | 1757 | """Update multiple records in one shot.""" | |
| 1758 | 1758 | updated.extend(records) | |
| 1759 | 1759 | ||
| 1760 | - zc.add_listener(MyListener(), None) # type: ignore[arg-type] | ||
| 1760 | + zc.add_listener(EventStore(), None) # type: ignore[arg-type] | ||
| 1761 | 1761 | await asyncio.sleep(0) # flush out any call soons | |
| 1762 | 1762 | assert ( | |
| 1763 | 1763 | "listeners passed to async_add_listener must inherit from RecordUpdateListener" in caplog.text | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,7 +47,7 @@ def test_integration_with_listener_class(self): | |||
| 47 | 47 | name = "UPPERxxxyyyæøå" | |
| 48 | 48 | registration_name = f"{name}.{subtype}" | |
| 49 | 49 | ||
| 50 | - class MyListener(r.ServiceListener): | ||
| 50 | + class EventStore(r.ServiceListener): | ||
| 51 | 51 | def add_service(self, zeroconf, type, name): | |
| 52 | 52 | zeroconf.get_service_info(type, name) | |
| 53 | 53 | service_added.set() | |
@@ -78,7 +78,7 @@ def remove_service(self, zeroconf, type, name): | |||
| 78 | 78 | def update_service(self, zeroconf, type, name): | |
| 79 | 79 | sub_service_updated.set() | |
| 80 | 80 | ||
| 81 | - listener = MyListener() | ||
| 81 | + listener = EventStore() | ||
| 82 | 82 | zeroconf_browser = Zeroconf(interfaces=["127.0.0.1"]) | |
| 83 | 83 | zeroconf_browser.add_service_listener(type_, listener) | |
| 84 | 84 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments