From cbd2f17058fcc41898ec665c0779d2a9243b2270bda4f1bd11a93f894017c69b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 5 Nov 2024 21:30:08 +0000 Subject: [PATCH] - Update to 0.136.0 * fix: update python-semantic-release to fix release process * fix: add ignore for .c file for wheels * fix: correct typos * feat: use SPDX license identifier - from version 0.135.0 * feat: improve performance of DNSCache backend OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zeroconf?expand=0&rev=80 --- .gitattributes | 23 + .gitignore | 1 + 0.132.2.tar.gz | 3 + 0.133.0.tar.gz | 3 + 0.134.0.tar.gz | 3 + 0.136.0.tar.gz | 3 + python-zeroconf.changes | 943 ++++++++++++++++++++++++++++++++++++++++ python-zeroconf.spec | 73 ++++ 8 files changed, 1052 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 0.132.2.tar.gz create mode 100644 0.133.0.tar.gz create mode 100644 0.134.0.tar.gz create mode 100644 0.136.0.tar.gz create mode 100644 python-zeroconf.changes create mode 100644 python-zeroconf.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/0.132.2.tar.gz b/0.132.2.tar.gz new file mode 100644 index 0000000..9c82cdb --- /dev/null +++ b/0.132.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0188086e1806d19bf49f797b25a1eba9b14e60422931188af287a98b304b80e +size 184339 diff --git a/0.133.0.tar.gz b/0.133.0.tar.gz new file mode 100644 index 0000000..bdf13dc --- /dev/null +++ b/0.133.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd4c4f6a6c13db713ef1d279a4f14dae190e245a68b956919826ebb53d54fc81 +size 187099 diff --git a/0.134.0.tar.gz b/0.134.0.tar.gz new file mode 100644 index 0000000..ffe7d86 --- /dev/null +++ b/0.134.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5627055d703c685312f3ae03b4f5159bf43845525550827c100ad68b970ab00 +size 187422 diff --git a/0.136.0.tar.gz b/0.136.0.tar.gz new file mode 100644 index 0000000..910eec3 --- /dev/null +++ b/0.136.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:120565a8f5ca29a21da2a05dbfa7c2dc694a64c0e5b01b6c8d6144cec9f75199 +size 255118 diff --git a/python-zeroconf.changes b/python-zeroconf.changes new file mode 100644 index 0000000..f8f3b4d --- /dev/null +++ b/python-zeroconf.changes @@ -0,0 +1,943 @@ +------------------------------------------------------------------- +Mon Nov 4 13:45:49 UTC 2024 - John Paul Adrian Glaubitz + +- Update to 0.136.0 + * fix: update python-semantic-release to fix release process + * fix: add ignore for .c file for wheels + * fix: correct typos + * feat: use SPDX license identifier +- from version 0.135.0 + * feat: improve performance of DNSCache backend + +------------------------------------------------------------------- +Mon Sep 23 09:05:43 UTC 2024 - Dirk Müller + +- update to 0.134.0: + * Improve performance when IP addresses change frequently + * Improve helpfulness of ServiceInfo.request assertions + +------------------------------------------------------------------- +Sun Sep 8 16:34:08 UTC 2024 - Dirk Müller + +- update to 0.133.0: + * Improve performance of ip address caching + * Enable building of arm64 macOS builds + * Add classifier for python 3.13 + * Python 3.13 support + +------------------------------------------------------------------- +Wed May 8 10:56:24 UTC 2024 - Dirk Müller + +- update to 0.132.2: + * Update references to minimum-supported python version of 3.8 + * Set change during iteration when dispatching listeners + * Make async_get_service_info available on the Zeroconf object + * Drop python 3.7 support + * Avoid including scope_id in IPv6Address object if its zero + * Small speed up to constructing outgoing packets + * Speed up processing incoming packets + * Speed up the query handler + * Make ServiceInfo aware of question history + * Small speed up to ServiceInfo construction + * Significantly improve efficiency of the ServiceBrowser + scheduler + * Small speed up to processing incoming records + * Small performance improvement for converting time + * Small performance improvement for ServiceInfo asking + questions + * Small performance improvement constructing outgoing questions + * Scheduling race with the QueryScheduler + * Ensure question history suppresses duplicates + * Microsecond precision loss in the query handler + * Ensure IPv6 scoped address construction uses the string cache + * Add decoded_properties method to ServiceInfo + * Ensure ServiceInfo.properties always returns bytes + * Cache is_unspecified for zeroconf ip address objects + * `ServiceInfo.properties` always returns a dictionary with + type `dict[bytes, bytes | None]` instead of a mix `str` and + `bytes`. It was only possible to get a mixed dictionary if it + was manually passed in when `ServiceInfo` was constructed. + * Performance regression with ServiceInfo IPv6Addresses + * Re-expose ServiceInfo._set_properties for backwards compat + * Correct nsec record writing + * Timestamps missing double precision + * Match cython version for dev deps to build deps + * Correct handling of IPv6 addresses with scope_id in + ServiceInfo + * Speed up unpacking TXT record data in ServiceInfo + * Small speed up to writing outgoing packets + * Speed up incoming packet reader + * Small speed up to processing incoming dns records + * Speed up outgoing packet writer + * Speed up writing name compression for outgoing packets + * Speed up service browser queries when browsing many types + * Avoid decoding known answers if we have no answers to give + * Small speed up to process incoming packets + * Speed up instances only used to lookup answers + * Do not build aarch64 wheels for PyPy + * Speed up record updates + * Speed up incoming packet processing with a memory view + * Speed up decoding labels from incoming data + * Speed up ServiceBrowsers with a pxd for the signal interface + * Reduce size of wheels by excluding generated .c files + * Small improvements to ServiceBrowser performance + * Small cleanups to incoming data handlers + * Ensure ServiceInfo cache is cleared when adding to the + registry + * Add missing python definition for addresses_by_version + * Speed up outgoing multicast queue + * Speed up responding to queries + * Improve performance of loading records from cache in + ServiceInfo + * Improve AsyncServiceBrowser performance + * Speed up ServiceBrowsers with a cython pxd + * Speed up adding and removing RecordUpdateListeners + * Cache construction of records used to answer queries from the + service registry + * Race with InvalidStateError when async_request times out + * Speed up processing incoming records + +------------------------------------------------------------------- +Tue Jun 20 17:40:25 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Wed May 3 09:24:19 UTC 2023 - Dirk Müller + +- update to 0.56.0: + * Reduce denial of service protection overhead (#1157) + * Improve performance of processing incoming records (#1155) + * Avoid waking async_request when record updates are not + relevant (#1153) (`a3f970c`) + * Addresses incorrect after server name change (#1154) + * Improve ServiceBrowser performance by removing OrderedDict + * Make parsed_scoped_addresses return addresses in the same + order as all other methods (#1150) (`9b6adcf`) + * Small cleanups to cache cleanup interval (#1146) (`b434b60`) + * Add ip_addresses_by_version to ServiceInfo (#1145) + * Speed up processing records in the ServiceBrowser (#1143) + * Speed up matching types in the ServiceBrowser (#1144) + * Include tests and docs in sdist archives (#1142) (`da10a3b`) + * Improve performance of constructing ServiceInfo (#1141) + * Small speed up to handler dispatch (#1140) (`5bd1b6e`) + * Speed up processing incoming records (#1139) (`7246a34`) + * Reduce overhead to send responses (#1135) (`c4077dd`) + * Correct duplicate record entries in windows wheels by + updating poetry-core (#1134) (`a43055d`) + * Hold a strong reference to the query sender start task + (#1128) (`808c3b2`) + * Missing c extensions with newer poetry (#1129) (`44d7fc6`) + * The equality checks for DNSPointer and DNSService should be + case insensitive (#1122) (`48ae77f`) + * Optimize equality checks for DNS records (#1120) (`3a25ff7`) + * Optimize the dns cache (#1119) (`e80fcef`) + * Optimize construction of outgoing packets (#1118) (`81e186d`) + * Optimize dns objects by adding pxd files (#1113) (`919d4d8`) + * Optimize incoming parser by reducing call stack (#1116) + * Optimize incoming parser by using unpack_from (#1115) + * Optimize incoming parser by adding pxd files (#1111) + * Fix project name in pyproject.toml (#1112) (`a330f62`) + * Drop async_timeout requirement for python 3.11+ (#1107) + * This is a stub version to initialize python-semantic-release + * This version will not be published + * Fix IP changes being missed by ServiceInfo (\#1102) @bdraco + * Fix port changes not being seen by ServiceInfo (\#1100) + * Performance improvements for parsing incoming packet data + +------------------------------------------------------------------- +Sat Sep 17 18:38:52 UTC 2022 - Antoine Belvire + +- Re-enable test_service_browser_expire_callbacks: Should be fixed + with 0.39.0 (gh#jstasiak/python-zeroconf!1084). +- Add missing dependency on python-async_timeout at run time. + +------------------------------------------------------------------- +Sat Sep 17 16:40:31 UTC 2022 - marec + +- Added build dependency python-async_timeout in order to fix build + failure. + +------------------------------------------------------------------- +Sat Sep 17 07:29:19 UTC 2022 - Dirk Müller + +- Update to 0.39.1: + * Performance improvements for constructing outgoing packet data. +- Changes from 0.39.0: + * Switch to using async_timeout for timeouts: Significantly + reduces the number of asyncio tasks that are created when using + ServiceInfo or AsyncServiceInfo + (gh#jstasiak/python-zeroconf!1081). + +------------------------------------------------------------------- +Sat Jun 25 15:21:12 UTC 2022 - Antoine Belvire + +- Ignore flakey test (gh#jstasiak/python-zeroconf#1077). + +------------------------------------------------------------------- +Wed Jun 22 20:45:56 UTC 2022 - Yogalakshmi Arunachalam + +- update to 0.38.7: + * Performance improvements for parsing incoming packet data + (gh#jstasiak/python-zeroconf#1076). + +------------------------------------------------------------------- +Sat Jun 4 12:14:38 UTC 2022 - Dirk Müller + +- update to 0.38.6: + * Performance improvements for fetching ServiceInfo + * Fix ServiceBrowsers not getting ServiceStateChange.Removed callbacks on PTR record expire + * Fix missing minimum version of python 3.7 + * Fix IP Address updates when hostname is uppercase + +------------------------------------------------------------------- +Fri Feb 4 22:29:27 UTC 2022 - Dirk Müller + +- update to 0.38.3: + * Make decode errors more helpful in finding the source of the bad data + +------------------------------------------------------------------- +Mon Jan 3 10:29:30 UTC 2022 - Dirk Müller + +- update to 0.38.1: + * Dropped Python 3.6 support + * Handle Service types that end with another service type + * Improve performance of query scheduler + * Avoid linear type searches in ServiceBrowsers + +------------------------------------------------------------------- +Mon Nov 29 11:04:03 UTC 2021 - Dirk Müller + +- update to 0.37.0: + * Adding a listener that does not inherit from RecordUpdateListener now logs + an error + * The NotRunningException exception is now thrown when Zeroconf is not + running (#1033) @bdraco + * Before this change the consumer would get a timeout or an EventLoopBlocked + exception when calling ServiceInfo.*request when the instance had already been shutdown + or had failed to startup. + * The EventLoopBlocked exception is now thrown when a coroutine times out + +------------------------------------------------------------------- +Sat Nov 6 18:15:23 UTC 2021 - Dirk Müller + +- update to 0.36.12: + * scope_id is now stripped from IPv6 addresses if given + * Optimized decoding labels from incoming packets + * Prevent service lookups from deadlocking if time abruptly moves backwards + +------------------------------------------------------------------- +Tue Oct 26 20:31:03 UTC 2021 - Dirk Müller + +- update to 0.36.9: + * Ensure ServiceInfo orders newest addresses first + +------------------------------------------------------------------- +Tue Oct 19 19:36:05 UTC 2021 - Antoine Belvire + +- Remove duplicate sources. + +------------------------------------------------------------------- +Sat Oct 16 19:44:11 UTC 2021 - Dirk Müller + +- update to 0.36.8 + * Fixed ServiceBrowser infinite loop when zeroconf is closed before it is canceled + * Improved performance of responding to queries + * Improved log message when receiving an invalid or corrupt packet + * Improved performance of sending outgoing packets + * Reduced memory usage for incoming and outgoing packets + * Improved performance of constructing outgoing packets + * Deferred parsing of incoming packets when it can be avoided + * Improved performance of parsing incoming packets + +------------------------------------------------------------------- +Mon Sep 6 09:19:13 UTC 2021 - Antonio Larrosa + +- Update to 0.36.2: + * Include NSEC records for non-existent types when responding + with addresses + * Implements RFC6762 sec 6.2 + (http://datatracker.ietf.org/doc/html/rfc6762#section-6.2) + +- Update to 0.36.1: + * Skip goodbye packets for addresses when there is another + service registered with the same name (#968) @bdraco + * If a ServiceInfo that used the same server name as another + ServiceInfo was unregistered, goodbye packets would be sent for + the addresses and would cause the other service to be seen as + offline. + * Fixed equality and hash for dns records with the unique bit + (#969) + * These records should have the same hash and equality since + the unique bit (cache flush bit) is not considered when adding + or removing the records from the cache. + +- Update to 0.36.0: + * Technically backwards incompatible: + * Fill incomplete IPv6 tuples to avoid WinError on windows (#965) + +------------------------------------------------------------------- +Mon Aug 16 01:39:16 UTC 2021 - Fusion Future + +- Update to 0.35.1: + * Only reschedule types if the send next time changes (#958) + @bdraco + * When the PTR response was seen again, the timer was being + canceled and rescheduled even if the timer was for the same + time. While this did not cause any breakage, it is quite + inefficient. + * Cache DNS record and question hashes (#960) @bdraco + * The hash was being recalculated every time the object was + being used in a set or dict. Since the hashes are effectively + immutable, we only calculate them once now. +- Changes from 0.35.0: + * Reduced chance of accidental synchronization of ServiceInfo + requests (#955) @bdraco + * Sort aggregated responses to increase chance of name compression + (#954) @bdraco + Technically backwards incompatible: + * Send unicast replies on the same socket the query was received + (#952) @bdraco + * When replying to a QU question, we do not know if the sending + host is reachable from all of the sending sockets. We now + avoid this problem by replying via the receiving socket. This + was the existing behavior when InterfaceChoice.Default is set. + * This change extends the unicast relay behavior to used with + InterfaceChoice.Default to apply when InterfaceChoice.All + or interfaces are explicitly passed when instantiating a + Zeroconf instance. + * Fixes #951 +- Changes from 0.34.3: + * Fix sending immediate multicast responses (#949) @bdraco +- Changes from 0.34.2: + * Coalesce aggregated multicast answers (#945) @bdraco + * When the random delay is shorter than the last scheduled + response, answers are now added to the same outgoing time group. + * This reduces traffic when we already know we will be sending + a group of answers inside the random delay window described + in datatracker.ietf.org/doc/html/rfc6762#section-6.3 + * Ensure ServiceInfo requests can be answered inside the default + timeout with network protection (#946) @bdraco + * Adjust the time windows to ensure responses that have triggered + the protection against against excessive packet flooding due to + software bugs or malicious attack described in RFC6762 section + 6 can respond in under 1350ms to ensure ServiceInfo can ask + two questions within the default timeout of 3000ms +- Changes from 0.34.1: + * Ensure multicast aggregation sends responses within 620ms + (#942) @bdraco + * Responses that trigger the protection against against + excessive packet flooding due to software bugs or malicious + attack described in RFC6762 section 6 could cause the multicast + aggregation response to be delayed longer than 620ms (The maximum + random delay of 120ms and 500ms additional for aggregation). + * Only responses that trigger the protection are delayed longer + than 620ms +- Changes from 0.34.0: + * Implemented Multicast Response Aggregation (#940) @bdraco + * Responses are now aggregated when possible per rules in RFC6762 + section 6.4 + * Responses that trigger the protection against against + excessive packet flooding due to software bugs or malicious + attack described in RFC6762 section 6 are delayed instead of + discarding as it was causing responders that implement Passive + Observation Of Failures (POOF) to evict the records. + * Probe responses are now always sent immediately as there were + cases where they would fail to be answered in time to defend + a name. +- Changes from 0.33.4: + * Ensure zeroconf can be loaded when the system disables IPv6 + (#933) @che0 +- Changes from 0.33.3: + * Added support for forward dns compression pointers (#934) @bdraco + * Provide sockname when logging a protocol error (#935) @bdraco +- Changes from 0.33.2: + * Handle duplicate goodbye answers in the same packet (#928) + @bdraco + * Solves an exception being thrown when we tried to remove the + known answer from the cache when the second goodbye answer in + the same packet was processed + * Fixed #926 + * Skip ipv6 interfaces that return ENODEV (#930) @bdraco +- Changes from 0.33.1: + * Version number change only with less restrictive directory + permissions + * Fixed #923 +- Changes from 0.33.0: + This release eliminates all threading locks as all non-threadsafe + operations now happen in the event loop. + * Let connection_lost close the underlying socket (#918) @bdraco + * The socket was closed during shutdown before asyncio's + connection_lost handler had a chance to close it which resulted + in a traceback on windows. + * Fixed #917 + Technically backwards incompatible: + * Removed duplicate unregister_all_services code (#910) @bdraco + * Calling Zeroconf.close from same asyncio event loop zeroconf + is running in will now skip unregister_all_services and log + a warning as this a blocking operation and is not async safe + and never has been. + * Use AsyncZeroconf instead, or for legacy code call + async_unregister_all_services before Zeroconf.close +- Changes from 0.32.1: + * Increased timeout in ServiceInfo.request to handle loaded systems + (#895) @bdraco + * It can take a few seconds for a loaded system to run the + async_request coroutine when the event loop is busy, or the + system is CPU bound (example being Home Assistant startup). We + now add an additional _LOADED_SYSTEM_TIMEOUT (10s) to the + run_coroutine_threadsafe calls to ensure the coroutine has + the total amount of time to run up to its internal timeout + (default of 3000ms). + * Ten seconds is a bit large of a timeout; however, it is only + used in cases where we wrap other timeouts. We now expect the + only instance the run_coroutine_threadsafe result timeout will + happen in a production circumstance is when someone is running + a ServiceInfo.request() in a thread and another thread calls + Zeroconf.close() at just the right moment that the future + is never completed unless the system is so loaded that it is + nearly unresponsive. + * The timeout for run_coroutine_threadsafe is the maximum time + a thread can cleanly shut down when zeroconf is closed out in + another thread, which should always be longer than the underlying + thread operation. +- Changes from 0.32.0: + This release offers 100% line and branch coverage. + * Made ServiceInfo first question QU (#852) @bdraco + * We want an immediate response when requesting with ServiceInfo + by asking a QU question; most responders will not delay the + response and respond right away to our question. This also + improves compatibility with split networks as we may not have + been able to see the response otherwise. If the responder has + not multicast the record recently, it may still choose to do + so in addition to responding via unicast + * Reduces traffic when there are multiple zeroconf instances + running on the network running ServiceBrowsers + * If we don't get an answer on the first try, we ask a QM question + in the event, we can't receive a unicast response for some reason + * This change puts ServiceInfo inline with ServiceBrowser which + also asks the first question as QU since ServiceInfo is commonly + called from ServiceBrowser callbacks + * Limited duplicate packet suppression to 1s intervals (#841) + @bdraco + * Only suppress duplicate packets that happen within the same + second. Legitimate queriers will retry the question if they + are suppressed. The limit was reduced to one second to be in + line with rfc6762 + * Made multipacket known answer suppression per interface (#836) + @bdraco + * The suppression was happening per instance of Zeroconf instead + of per interface. Since the same network can be seen on multiple + interfaces (usually and wifi and ethernet), this would confuse + the multi-packet known answer supression since it was not + expecting to get the same data more than once + * New ServiceBrowsers now request QU in the first outgoing when + unspecified (#812) @bdraco + * https://datatracker.ietf.org/doc/html/rfc6762#section-5.4 When + we start a ServiceBrowser and zeroconf has just started up, + the known answer list will be small. By asking a QU question + first, it is likely that we have a large known answer list + by the time we ask the QM question a second later (current + default which is likely too low but would be a breaking change + to increase). This reduces the amount of traffic on the network, + and has the secondary advantage that most responders will answer + a QU question without the typical delay answering QM questions. + * IPv6 link-local addresses are now qualified with scope_id + (#343) @ibygrave + * When a service is advertised on an IPv6 address where the scope + is link local, i.e. fe80::/64 (see RFC 4007) the resolved IPv6 + address must be extended with the scope_id that identifies + through the "%" symbol the local interface to be used when + routing to that address. A new API parsed_scoped_addresses() + is provided to return qualified addresses to avoid breaking + compatibility on the existing parsed_addresses(). + * Network adapters that are disconnected are now skipped (#327) + @ZLJasonG + * Fixed listeners missing initial packets if Engine starts too + quickly (#387) @bdraco + * When manually creating a zeroconf.Engine object, it is no longer + started automatically. It must manually be started by calling + .start() on the created object. + * The Engine thread is now started after all the listeners have + been added to avoid a race condition where packets could be + missed at startup. + * Fixed answering matching PTR queries with the ANY query (#618) + @bdraco + * Fixed lookup of uppercase names in the registry (#597) @bdraco + * If the ServiceInfo was registered with an uppercase name and + the query was for a lowercase name, it would not be found + and vice-versa. + * Fixed unicast responses from any source port (#598) @bdraco + * Unicast responses were only being sent if the source port was + 53, this prevented responses when testing with dig: + dig -p 5353 @224.0.0.251 media-12.local + The above query will now see a response + * Fixed queries for AAAA records not being answered (#616) @bdraco + * Removed second level caching from ServiceBrowsers (#737) @bdraco + * The ServiceBrowser had its own cache of the last time it saw + a service that was reimplementing the DNSCache and presenting + a source of truth problem that lead to unexpected queries when + the two disagreed. + * Fixed server cache not being case-insensitive (#731) @bdraco + * If the server name had uppercase chars and any of the matching + records were lowercase, and the server would not be found + * Fixed cache handling of records with different TTLs (#729) + @bdraco + * There should only be one unique record in the cache at a time as + having multiple unique records will different TTLs in the cache + can result in unexpected behavior since some functions returned + all matching records and some fetched from the right side of + the list to return the newest record. Instead we now store + the records in a dict to ensure that the newest record always + replaces the same unique record, and we never have a source of + truth problem determining the TTL of a record from the cache. + * Fixed ServiceInfo with multiple A records (#725) @bdraco + * If there were multiple A records for the host, ServiceInfo would + always return the last one that was in the incoming packet, + which was usually not the one that was wanted. + * Fixed stale unique records expiring too quickly (#706) @bdraco + * Records now expire 1s in the future instead of instant removal. + tools.ietf.org/html/rfc6762#section-10.2 Queriers receiving a + Multicast DNS response with a TTL of zero SHOULD NOT immediately + delete the record from the cache, but instead record a TTL of + 1 and then delete the record one second later. In the case of + multiple Multicast DNS responders on the network described in + Section 6.6 above, if one of the responders shuts down and + incorrectly sends goodbye packets for its records, it gives + the other cooperating responders one second to send out their + own response to "rescue" the records before they expire and + are deleted. + * Fixed exception when unregistering a service multiple times + (#679) @bdraco + * Added an AsyncZeroconfServiceTypes to mirror ZeroconfServiceTypes + to zeroconf.asyncio (#658) @bdraco + * Fixed interface_index_to_ip6_address not skiping ipv4 adapters + (#651) @bdraco + * Added async_unregister_all_services to AsyncZeroconf (#649) + @bdraco + * Fixed services not being removed from the registry when calling + unregister_all_services (#644) @bdraco + * There was a race condition where a query could be answered for + a service in the registry, while goodbye packets which could + result in a fresh record being broadcast after the goodbye if + a query came in at just the right time. To avoid this, we now + remove the services from the registry right after we generate + the goodbye packet + * Fixed zeroconf exception on load when the system disables IPv6 + (#624) @bdraco + * Fixed the QU bit missing from for probe queries (#609) @bdraco + * The bit should be set per + datatracker.ietf.org/doc/html/rfc6762#section-8.1 + * Fixed the TC bit missing for query packets where the known + answers span multiple packets (#494) @bdraco + * Fixed packets not being properly separated when exceeding + maximum size (#498) @bdraco + * Ensure that questions that exceed the max packet size + are moved to the next packet. This fixes DNSQuestions + being sent in multiple packets in violation of: + datatracker.ietf.org/doc/html/rfc6762#section-7.2 + * Ensure only one resource record is sent when a record exceeds + _MAX_MSG_TYPICAL datatracker.ietf.org/doc/html/rfc6762#section-17 + * Fixed PTR questions asked in uppercase not being answered + (#465) @bdraco + * Added Support for context managers in Zeroconf and AsyncZeroconf + (#284) @shenek + * Implemented an AsyncServiceBrowser to compliment the sync + ServiceBrowser (#429) @bdraco + * Added async_get_service_info to AsyncZeroconf and async_request + to AsyncServiceInfo (#408) @bdraco + * Implemented allowing passing in a sync Zeroconf instance to + AsyncZeroconf (#406) @bdraco + * Fixed IPv6 setup under MacOS when binding to "" (#392) @bdraco + * Fixed ZeroconfServiceTypes.find not always cancels the + ServiceBrowser (#389) @bdraco + * There was a short window where the ServiceBrowser thread could + be left running after Zeroconf is closed because the .join() + was never waited for when a new Zeroconf object was created + * Fixed duplicate packets triggering duplicate updates (#376) + @bdraco + * If TXT or SRV records update was already processed and then + received again, it was possible for a second update to be called + back in the ServiceBrowser + * Fixed ServiceStateChange.Updated event happening for IPs that + already existed (#375) @bdraco + * Fixed RFC6762 Section 10.2 paragraph 2 compliance (#374) @bdraco + * Reduced length of ServiceBrowser thread name with many types + (#373) @bdraco + * Fixed empty answers being added in ServiceInfo.request (#367) + @bdraco + * Fixed ServiceInfo not populating all AAAA records (#366) @bdraco + * Use get_all_by_details to ensure all records are loaded into + addresses. + * Only load A/AAAA records from the cache once in load_from_cache + if there is a SRV record present + * Move duplicate code that checked if the ServiceInfo was complete + into its own function + * Fixed a case where the cache list can change during iteration + (#363) @bdraco + * Return task objects created by AsyncZeroconf (#360) @nocarryr + Traffic Reduction: + * Added support for handling QU questions (#621) @bdraco + * Implements RFC 6762 sec 5.4: Questions Requesting Unicast + Responses datatracker.ietf.org/doc/html/rfc6762#section-5.4 + * Implemented protect the network against excessive packet + flooding (#619) @bdraco + * Additionals are now suppressed when they are already in the + answers section (#617) @bdraco + * Additionals are no longer included when the answer is + suppressed by known-answer suppression (#614) @bdraco + * Implemented multi-packet known answer supression (#687) @bdraco + * Implements datatracker.ietf.org/doc/html/rfc6762#section-7.2 + * Implemented efficient bucketing of queries with known answers + (#698) @bdraco + * Implemented duplicate question suppression (#770) @bdraco + http://datatracker.ietf.org/doc/html/rfc6762#section-7.3 + Technically backwards incompatible: + * Update internal version check to match docs (3.6+) (#491) + @bdraco + * Python version earlier then 3.6 were likely broken with + zeroconf already, however, the version is now explicitly + checked. + * Update python compatibility as PyPy3 7.2 is required (#523) + @bdraco + Backwards incompatible: + * Drop oversize packets before processing them (#826) @bdraco + * Oversized packets can quickly overwhelm the system and deny + service to legitimate queriers. In practice, this is usually + due to broken mDNS implementations rather than malicious + actors. + * Guard against excessive ServiceBrowser queries from PTR + records significantly lowerthan recommended (#824) @bdraco + * We now enforce a minimum TTL for PTR records to avoid + ServiceBrowsers generating excessive queries refresh + queries. Apple uses a 15s minimum TTL, however, we do not + have the same level of rate limit and safeguards, so we use + 1/4 of the recommended value. + * RecordUpdateListener now uses async_update_records instead + of update_record (#419, #726) @bdraco + This allows the listener to receive all the records that + have been updated in a single transaction such as a packet + or cache expiry. + * update_record has been deprecated in favor of + async_update_records A compatibility shim exists to ensure + classes that use RecordUpdateListener as a base class continue + to have update_record called, however, they should be updated + as soon as possible. + * A new method async_update_records_complete is now called on + each listener when all listeners have completed processing + updates and the cache has been updated. This allows + ServiceBrowsers to delay calling handlers until they are sure + the cache has been updated as its a common pattern to call + for ServiceInfo when a ServiceBrowser handler fires. + * The async_ prefix was chosen to make it clear that these + functions run in the eventloop and should never do blocking + I/O. Before 0.32+ these functions ran in a select() loop and + should not have been doing any blocking I/O, but it was not + clear to implementors that I/O would block the loop. + * Pass both the new and old records to async_update_records + (#792) @bdraco + * Pass the old_record (cached) as the value and the new_record + (wire) to async_update_records instead of forcing each consumer + to check the cache since we will always have the old_record + when generating the async_update_records call. This avoids + the overhead of multiple cache lookups for each listener. +- Remove fix version command as upstream has fixed the version number. +- Move skipped tests to spec file, drop disable-tests.patch. +- Relocate tests to tests directory. (gh#jstasiak/python-zeroconf#526) +- Add test_close_multiple_times to skipped test list. + +------------------------------------------------------------------- +Fri Jun 4 17:16:48 UTC 2021 - Antonio Larrosa + +- Fix package version. Upstream didn't tag nor change the version + number in git although it was released in pypi as 0.31.0 + +------------------------------------------------------------------- +Thu Jun 3 11:53:04 UTC 2021 - Antonio Larrosa + +- Add patch to disable some tests that fail in obs: + * disable-tests.patch + +------------------------------------------------------------------- +Thu Jun 3 11:43:41 UTC 2021 - Antonio Larrosa + +- update to 0.31.0: + * Separated cache loading from I/O in ServiceInfo and fixed cache + lookup (#356), thanks to J. Nick Koston. + The ServiceInfo class gained a load_from_cache() method to only + fetch information from Zeroconf cache (if it exists) with no IO + performed. Additionally this should reduce IO in cases where + cache lookups were previously incorrectly failing. + +- update to 0.30.0: + * Some nice refactoring work including removal of the Reaper + thread, thanks to J. Nick Koston. + * Fixed a Windows-specific The requested address is not valid in + its context regression, thanks to Timothee ‘TTimo’ Besset and + J. Nick Koston. + * Provided an asyncio-compatible service registration layer (in + the zeroconf.asyncio module), thanks to J. Nick Koston. + +------------------------------------------------------------------- +Wed Apr 21 21:27:04 UTC 2021 - Dirk Müller + +- update to 0.29.0: + * A single socket is used for listening on responding when `InterfaceChoice.Default` is chosen. + * Dropped Python 3.5 support + +------------------------------------------------------------------- +Thu Jan 7 13:25:31 UTC 2021 - Antonio Larrosa + +- update to 0.28.8: + * Fixed the packet generation when multiple packets are + necessary, previously invalid packets were generated sometimes. + Patch thanks to J. Nick Koston. + +------------------------------------------------------------------- +Sat Dec 19 10:34:17 UTC 2020 - Dirk Müller + +- update to 0.28.7: + * Fixed the IPv6 address rendering in the browser example, thanks to Alexey Vazhnov. + * Fixed a crash happening when a service is added or removed during handle_response + and improved exception handling, thanks to J. Nick Koston. + +------------------------------------------------------------------- +Thu Nov 26 08:50:58 UTC 2020 - Dirk Mueller + +- update to 0.28.6: + * Loosened service name validation when receiving from the network this lets us handle + some real world devices previously causing errors + * Enabled ignoring duplicated messages which decreases CPU usage + * Fixed spurious AttributeError: module 'unittest' has no attribute 'mock' + * Improved cache reaper performance significantly + +------------------------------------------------------------------- +Wed Sep 16 11:22:18 UTC 2020 - Dirk Mueller + +- update to 0.28.3: + * Reduced a time an internal lock is held which should eliminate deadlocks in high-traffic networks. + * Stopped asking questions we already have answers for in cache, thanks to Paul Daumlechner. + * Removed initial delay before querying for service info, thanks to Erik Montnemery. + * Fixed a resource leak connected to using ServiceBrowser with multiple types + +------------------------------------------------------------------- +Tue Jul 21 10:13:44 UTC 2020 - Marketa Calabkova + +- update to 0.28.0 + * Added support for passing text addresses to ServiceInfo. + * Improved logging (includes fixing an incorrect logging call) + +------------------------------------------------------------------- +Mon Jun 8 19:36:00 UTC 2020 - Dirk Mueller + +- update to 0.27.1 + * Improved the logging situation + * Large multi-resource responses are now split into separate packets which fixes a bad + mdns-repeater/ChromeCast Audio interaction ending with ChromeCast Audio crash (and possibly + some others) and improves RFC 6762 compliance, thanks to Greg Badros + * Added a warning presented when the listener passed to ServiceBrowser lacks update_service() + callback + * Added support for finding all services available in the browser example, thanks to Perry Kunder + * Removed previously deprecated ServiceInfo address constructor parameter and property + * Improved readability of logged incoming data, thanks to Erik Montnemery + * Threads are given unique names now to aid debugging, thanks to Erik Montnemery + * Fixed a regression where get_service_info() called within a listener add_service method + would deadlock, timeout and incorrectly return None, fix thanks to Erik Montnemery, but + Matt Saxon and Hmmbob were also involved in debugging it. + * Added support for multiple types to ServiceBrowser, thanks to J. Nick Koston + * Fixed a race condition where a listener gets a message before the lock is created + * Fixed a performance regression introduced in 0.26.0, thanks to J. Nick Koston (this is close in + spirit to an optimization made in 0.24.5 by the same author) + * Fixed a regression where service update listener wasn't called on IP address change (it's called + on SRV/A/AAAA record changes now), thanks to Matt Saxon + +------------------------------------------------------------------- +Thu Apr 16 08:47:59 UTC 2020 - pgajdos@suse.com + +- version update to 0.25.1 + * Eliminated 5s hangup when calling Zeroconf.close(), thanks to Erik Montnemery + * Reverted uniqueness assertions when browsing, they caused a regression + Backwards incompatible: + * Rationalized handling of TXT records. +- deleted patches + - python-zeroconf-disable-some-tests.patch (not needed, replaced by -k 'not ...') + +------------------------------------------------------------------- +Mon Mar 9 10:57:37 UTC 2020 - pgajdos@suse.com + +- version update to 0.24.5 + * Fixed issues with shared records being used where they shouldn't be (TXT, SRV, A records are + unique now), thanks to Matt Saxon + * Stopped unnecessarily excluding host-only interfaces from InterfaceChoice.all as they don't + forbid multicast, thanks to Andreas Oberritter + * Fixed repr() of IPv6 DNSAddress, thanks to Aldo Hoeben + * Removed duplicate update messages sent to listeners, thanks to Matt Saxon + * Added support for cooperating responders, thanks to Matt Saxon + * Optimized handle_response cache check, thanks to J. Nick Koston + * Fixed memory leak in DNSCache, thanks to J. Nick Koston + * Fixed resetting TTL in DNSRecord.reset_ttl(), thanks to Matt Saxon + * Improved various DNS class' string representations, thanks to Jay Hogg + +------------------------------------------------------------------- +Sat Dec 28 20:25:16 UTC 2019 - Martin Hauke + +- Adjust dependencies and the %check section so the testsuite can + still be executed +- Add patch: + * python-zeroconf-disable-some-tests.patch +- Update to version 0.24.3 + * Fixed import-time "TypeError: 'ellipsis' object is not + iterable." on CPython 3.5.2 +- Update to version 0.24.2 + * Added support for AWDL interface on macOS (needed and used by + the opendrop project but should be useful in general) + * Added missing type hints +- Update to version 0.24.1 + * Applied some significant performance optimizations + * Fixed flushing outdated cache entries when incoming record + is unique + * Fixed handling updates of TXT records (they'd not get recorded + previously) +- Update to version 0.24.0 + * Added IPv6 support + * Added additional recommended records to PTR responses + * Added handling of ENOTCONN being raised during shutdown when + using Eventlet + * Included the py.typed marker in the package so that type + checkers know to use type hints from the source code + +------------------------------------------------------------------- +Thu Jun 6 07:35:15 UTC 2019 - Adrian Schröter + +- version update to 0.23.0 + * support for python 3.4 got dropped + * Add support for MyListener call getting updates to service TXT record + * Add support for multiple addresses when publishing a service + +------------------------------------------------------------------- +Mon May 6 09:00:04 UTC 2019 - pgajdos@suse.com + +- version update to 0.22.0 + * A lot of maintenance work (tooling, typing coverage and improvements, + spelling) + * Provided saner defaults in ServiceInfo's constructor, thanks to + Jorge Miranda + * Fixed service removal packets not being sent on shutdown, thanks to + Andrew Bonney + * Added a way to define TTL-s through ServiceInfo contructor parameters, + thanks to Andrew Bonney + * Adjusted query intervals to match RFC 6762, thanks to Andrew Bonney + * Made default TTL-s match RFC 6762, thanks to Andrew Bonney + +------------------------------------------------------------------- +Mon Mar 11 11:58:48 UTC 2019 - Tomáš Chvátal + +- Update to 0.21.3: + * no upstream changelog + * dropped python2 support +- Execute tests +- Update requirements based on upstream requires + +------------------------------------------------------------------- +Thu Feb 15 19:04:17 UTC 2018 - alarrosa@suse.com + +- Remove patch which was breaking zeroconf dependency check with python3 + (it was making pkg_resources generate a DistributionNotFound exception + because enum34 wasn't found). enum34 is only required by the python2 + package, which is what the enum-compat package is all about. + * python-zeroconf-0.19.1-enum34-instead-of-enum-compat.patch + +- Require python-enum-compat to require python-enum34 on python2 and + nothing on python3, just as the egg's requires.txt file does. + +------------------------------------------------------------------- +Fri Jul 7 22:47:48 UTC 2017 - antoine.belvire@opensuse.org + +- Update to version 0.19.1: + * Remove outdated example + * On Windows, python-netifaces 0.10.5 triggers a bug - This has + no impact for us, therefore there is no need for us to add a + version requirement on this dependency as upstream did. +- Rebase patch: + * Remove + python-zeroconf-0.17.4-enum34-instead-of-enum-compat.patch. + * Add python-zeroconf-0.19.1-enum34-instead-of-enum-compat.patch. + +------------------------------------------------------------------- +Sat Mar 18 12:46:41 UTC 2017 - antoine.belvire@opensuse.org + +- Remove .changes file from source (not needed). + +------------------------------------------------------------------- +Sat Mar 18 00:27:42 UTC 2017 - stefan.bruens@rwth-aachen.de + +- Convert package to python singlespec + +------------------------------------------------------------------- +Sat Feb 18 10:46:56 UTC 2017 - antoine.belvire@opensuse.org + +- Update to 0.18.0: + * Dropped Python 2.6 support + * Improved error handling inside code executed when Zeroconf + object is being closed +- Changes from 0.17.7: + * Better Handling of DNS Incoming Packets parsing exceptions + * Many exceptions will now log a warning the first time they are seen + * Catch and log sendto() errors + * Fix/Implement duplicate name change + * Fix overly strict name validation introduced in 0.17.6 + * Greatly improve handling of oversized packets including: + + Implement name compression per RFC1035 + + Limit size of generated packets to 9000 bytes as per RFC6762 + + Better handle over sized incoming packets + * Increased test coverage to 95% + +------------------------------------------------------------------- +Wed Dec 28 13:23:11 UTC 2016 - jengelh@inai.de + +- Improve write style of description + +------------------------------------------------------------------- +Wed Dec 28 08:51:37 UTC 2016 - tbechtold@suse.com + +- Use pypi.io as Source + +------------------------------------------------------------------- +Sun Jul 17 22:36:46 UTC 2016 - antoine.belvire@laposte.net + +- Update to 0.17.6: + * Many improvements to address race conditions and exceptions + during ZC() startup and shutdown, thanks to: morpav, veawor, + justingiorgi, herczy, stephenrauch + * Added more test coverage: strahlex, stephenrauch + * Stephen Rauch contributed: + + Speed up browser startup + + Add ZeroconfServiceTypes() query class to discover all + advertised service types + + Add full validation for service names, types and subtypes + + Fix for subtype browsing + + Fix DNSHInfo support + +------------------------------------------------------------------- +Wed Mar 16 19:46:09 UTC 2016 - antoine.belvire@laposte.net + +- Fix build on SLE 11: avoid BuildArch noarch. + +------------------------------------------------------------------- +Wed Mar 16 17:41:13 UTC 2016 - antoine.belvire@laposte.net + +- Update to 0.17.5: + * Fix OpenBSD compatibility, thanks to Alessio Sergi + * Fix race condition on ServiceBrowser startup, thanks to + gbiddison + * Fix installation on some Python 3 systems, thanks to Per + Sandström + * Fixed "size change during iteration" bug on Python 3, thanks to + gbiddison + +------------------------------------------------------------------- +Thu Mar 10 18:57:49 UTC 2016 - antoine.belvire@laposte.net + +- New package: python-zeroconf-0.17.4 +- Add python-zeroconf-0.17.4-enum34-instead-of-enum-compat.patch: +there is no need for a virtual python-enum-compat package here. diff --git a/python-zeroconf.spec b/python-zeroconf.spec new file mode 100644 index 0000000..ad3fc92 --- /dev/null +++ b/python-zeroconf.spec @@ -0,0 +1,73 @@ +# +# spec file for package python-zeroconf +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-zeroconf +Version: 0.136.0 +Release: 0 +Summary: Pure Python Multicast DNS Service Discovery Library (Bonjour/Avahi compatible) +License: LGPL-2.0-only +Group: Development/Languages/Python +URL: https://github.com/jstasiak/python-zeroconf +Source: https://github.com/python-zeroconf/python-zeroconf/archive/refs/tags/%{version}.tar.gz +BuildRequires: %{python_module async_timeout >= 4.0.1} +BuildRequires: %{python_module ifaddr >= 0.1.7} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module poetry-core} +BuildRequires: %{python_module pytest-asyncio} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-async_timeout >= 4.0.1 +Requires: python-ifaddr >= 0.1.7 +%python_subpackages + +%description +This is a fork of pyzeroconf, a Multicast DNS Service Discovery for Python. +It is compatible with Bonjour and Avahi. +Compared to some other Zeroconf/Bonjour/Avahi Python packages, python-zeroconf +is not tied to Bonjour or Avahi, does not use D-Bus and +does not force you to use a particular event loop or python-twisted. + +%prep +%autosetup -p1 + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand rm -f %{buildroot}%{$python_sitelib}/zeroconf/test.py +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# Skip tests: +# - test_integration_with_listener_ipv6: Requires network access +# - test_launch*: Require network access +# - test_close_multiple_times: Requires network access +%pytest tests -k 'not (test_integration_with_listener_ipv6 or test_launch or test_close_multiple_times)' + +%files %{python_files} +%doc README.rst +%license COPYING +%{python_sitearch}/zeroconf +%{python_sitearch}/zeroconf-%{version}.dist-info + +%changelog