Package: zeroconf-py2compat
python-zeroconf-py2compatThis is a fork of pyzeroconf, Multicast DNS Service Discovery for Python,
originally by Paul Scott-Murphy (https://github.com/paulsm/pyzeroconf),
modified by William McBrine (https://github.com/wmcbrine/pyzeroconf),
and then further modified (off the 0.19.1 tag, the last to support Py2.7)
by Jamie Alexandre (https://github.com/learningequality/python-zeroconf).Compatible with:BonjourAvahiCompared to some other Zeroconf/Bonjour/Avahi Python packages, python-zeroconf:isn’t tied to Bonjour or Avahidoesn’t use D-Busdoesn’t force you to use particular event loop or Twistedis pip-installablePython compatibilityCPython 2.7, 3.3+PyPy 2.2+ (possibly 1.9-2.1 as well)PyPy3 2.4+VersioningThis project’s versions follow the following pattern: MAJOR.MINOR.PATCH.MAJOR version has been 0 so farMINOR version is incremented on backward incompatible changesPATCH version is incremented on backward compatible changesStatusThere are some people using this package. I don’t actively use it and as such
any help I can offer with regard to any issues is very limited.How to get python-zeroconf-py2compat?PyPI pagehttps://pypi.python.org/pypi/zeroconf-py2compatGitHub projecthttps://github.com/learningequality/python-zeroconf-py2compatThe easiest way to install python-zeroconf-py2compat is using pip:pip install zeroconf-py2compatHow do I use it?Here’s an example of browsing for a service:fromsix.movesimportinputfromzeroconfimportServiceBrowser,ZeroconfclassMyListener(object):defremove_service(self,zeroconf,type,name):print("Service%sremoved"%(name,))defadd_service(self,zeroconf,type,name):info=zeroconf.get_service_info(type,name)print("Service%sadded, service info:%s"%(name,info))zeroconf=Zeroconf()listener=MyListener()browser=ServiceBrowser(zeroconf,"_http._tcp.local.",listener)try:input("Press enter to exit...\n\n")finally:zeroconf.close()NoteDiscovery and service registration useallavailable network interfaces by default.
If you want to customize that you need to specifyinterfacesargument when
constructingZeroconfobject (see the code for details).If you don’t know the name of the service you need to browse for, try:fromzeroconfimportZeroconfServiceTypesprint('\n'.join(ZeroconfServiceTypes.find()))See examples directory for more.Changelog0.19.16Fix issue preventing TXT record updates fromServiceBrowser0.19.15Track all requested broadcast interfaces in addition to those successfully attached0.19.14Exclude addresses starting with “169.254” from the list returned by get_all_addresses()0.19.13Converts some usage ofassertthat should likely persist ifpython -Ois usedBreaks out interface attachment fromZeroconf.__init__into its own method_add_interfacesAdds corresponding behavior for removing interfaces, along the lines of how_add_interfacesfunctions but in reverseExposes new public methodZeroconf.update_interfaceswhich triggers add or removal of interfacesPrevents stack trace reporting of errors that occur because the network is unreachable,errno.ENETUNREACHUpdatesZeroconf.sendto accept aninterfaceon which filter the interfaces it sends the messages on,
such that adding and removing interfaces can attempt to send add/remove messages when the interface is removed0.19.10Reduce (and make configurable) the _GLOBAL_DONE threading wait time to improve discovery.0.19.9Turn _GLOBAL_DONE into a threading Event to allow for better interruptability at close.0.19.8Handle exceptions in interface enumeration and just return an empty list.0.19.7Reverted from ifaddr back to ifcfg.0.19.6Switched from ifcfg to ifaddr for address enumeration.0.19.5Add support for Android, via pyjnius.0.19.4Vendored enum compat.0.19.3Fix to setup.py, so as to actually include zeroconf.py!0.19.2 (first release in learningequality/python-zeroconf-py2compat)Replace C-based netifaces with pure-Python ifcfg for portabilityAllow the DNS A record address to be determined by outgoing interface IPRefresh ServiceBrowser entries already when ‘stale’ (backport from 0.20.0)Add new records first in cache entry instead of last (backport from 0.20.0)Correct broken __eq__ in child classes to DNSRecord (backport from 0.20.0)Fix TTL handling for published service, and use RFC6762 (backport from 0.21.0)Fix UnboundLocalError for count after loop (backport from 0.21.0)Fix UTF-8 multibyte name compression (backport from 0.21.0)Fix a logging call (backport from 0.21.0)Fix service removal packets not being sent on shutdown (backport from 0.22.0)MyListener callback on service TXT record changes (backport from 0.23.0)0.19.1Allowed installation with netifaces >= 0.10.6 (a bug that was concerning us
got fixed)0.19.0Technically backwards incompatible - restricted netifaces dependency version to
work around a bug, seehttps://github.com/jstasiak/python-zeroconf/issues/84for
details0.18.0Dropped Python 2.6 supportImproved error handling inside code executed when Zeroconf object is being closed0.17.7Better Handling of DNS Incoming Packets parsing exceptionsMany exceptions will now log a warning the first time they are seenCatch and log sendto() errorsFix/Implement duplicate name changeFix overly strict name validation introduced in 0.17.6Greatly improve handling of oversized packets including:Implement name compression per RFC1035Limit size of generated packets to 9000 bytes as per RFC6762Better handle over sized incoming packetsIncreased test coverage to 95%0.17.6Many improvements to address race conditions and exceptions during ZC()
startup and shutdown, thanks to: morpav, veawor, justingiorgi, herczy,
stephenrauchAdded more test coverage: strahlex, stephenrauchStephen Rauch contributed:Speed up browser startupAdd ZeroconfServiceTypes() query class to discover all advertised service typesAdd full validation for service names, types and subtypesFix for subtype browsingFix DNSHInfo support0.17.5Fixed OpenBSD compatibility, thanks to Alessio SergiFixed race condition on ServiceBrowser startup, thanks to gbiddisonFixed installation on some Python 3 systems, thanks to Per SandströmFixed “size change during iteration” bug on Python 3, thanks to gbiddison0.17.4Fixed support for Linux kernel versions < 3.9 (thanks to Giovanni Harting
and Luckydonald, GitHub pull request #26)0.17.3Fixed DNSText repr on Python 3 (it’d crash when the text was longer than
10 bytes), thanks to Paulus Schoutsen for the patch, GitHub pull request #240.17.2Fixed installation on Python 3.4.3+ (was failing because of enum34 dependency
which fails to install on 3.4.3+, changed to depend on enum-compat instead;
thanks to Michael Brennan for the original patch, GitHub pull request #22)0.17.1Fixed EADDRNOTAVAIL when attempting to use dummy network interfaces on Windows,
thanks to daid0.17.0Added some Python dependencies so it’s not zero-dependencies anymoreImproved exception handling (it’ll be quieter now)Messages are listened to and sent using all available network interfaces
by default (configurable); thanks to Marcus MüllerStarted using logging more freelyFixed a bug with binary strings as property values being converted to False
(https://github.com/jstasiak/python-zeroconf/pull/10); thanks to Dr. SeussAdded newServiceBrowserevent handler interface (see the examples)PyPy3 now officially supportedFixed ServiceInfo repr on Python 3, thanks to Yordan Miladinov0.16.0Set up Python logging and started using itCleaned up code style (includes migrating from camel case to snake case)0.15.1Fixed handling closed socket (GitHub #4)0.15Forked by Jakub StasiakMade Python 3 compatibleAdded setup script, made installable by pip and uploaded to PyPISet up Travis buildReformatted the code and moved files aroundStopped catching BaseException in several places, that could hide errorsMarked threads as daemonic, they won’t keep application alive now0.14Fix for SOL_IP undefined on some systems - thanks Mike Erdely.Cleaned up examples.Lowercased module name.0.13Various minor changes; see git for details.No longer compatible with Python 2.2. Only tested with 2.5-2.7.Fork by William McBrine.0.12allow selection of binding interfacetypo fix - Thanks A. M. Kuchlingiremoved all use of word ‘Rendezvous’ - this is an API change0.11correction to comments for addListener methodsupport for new record types seen from OS X
- IPv6 address
- hostinfoignore unknown DNS record typesfixes to name decodingworks alongside other processes using port 5353 (e.g. on Mac OS X)tested against Mac OS X 10.3.2’s mDNSRespondercorrections to removal of list entries for service browser0.10Jonathon Paisley contributed these corrections:always multicast replies, even when query is unicastcorrect a pointer encoding problemcan now write records in any ordertraceback shown on failurebetter TXT record parsingserver is now separate from namecan cancel a service browsermodified some unit tests to accommodate these changes0.09remove all records on service unregistrationfix DOS security problem with readName0.08changed licensing to LGPL0.07faster shutdown on enginepointer encoding of outgoing namesServiceBrowser now worksnew unit tests0.06small improvements with unit testsadded defined exception typesnew style objectsfixed hostname/interface problemfixed socket timeout problemfixed add_service_listener() typo bugusing select() for socket readstested on Debian unstable with Python 2.2.20.05ensure case insensitivty on domain namessupport for unicast DNS queries0.04added some unit testsadded __ne__ adjuncts where requiredensure names end in ‘.local.’timeout on receiving socket for clean shutdownLicenseLGPL, see COPYING file for details.