debian/0000755000000000000000000000000012322440601007160 5ustar debian/docs0000644000000000000000000000001312065773100010034 0ustar README.rst debian/rules0000755000000000000000000000056112314307732010252 0ustar #!/usr/bin/make -f %: dh $@ --with python2,sphinxdoc --buildsystem=python_distutils .PHONY: override_dh_installchangelogs override_dh_installchangelogs: dh_installchangelogs CHANGES.rst .PHONY: override_dh_auto_build override_dh_auto_build: sphinx-build -b html docs build/html dh_auto_build .PHONY: override_dh_clean override_dh_clean: rm -rf build dh_clean debian/patches/0000755000000000000000000000000012322421645010616 5ustar debian/patches/no-tag-build.patch0000644000000000000000000000071012065776303014127 0ustar Description: Unset build_tag so the installed module isn't "dev" suffixed. Author: Neil Williams Forwarded: not-needed Last-Update: 2012-12-24 Index: kazoo/setup.cfg =================================================================== --- kazoo.orig/setup.cfg 2012-12-21 19:25:50.649997478 -0800 +++ kazoo/setup.cfg 2012-12-23 22:43:45.557703554 -0800 @@ -1,5 +1,5 @@ [egg_info] -tag_build = dev +tag_build = [nosetests] where=kazoo debian/patches/no-zope.patch0000644000000000000000000002362212322440452013230 0ustar Description: Remove repoze.sphinx-interface Author: Chuck Short Fowarded: Not-needed (https://github.com/python-zk/kazoo/issues/131) Index: kazoo-1.2.1/docs/api/interfaces.rst =================================================================== --- kazoo-1.2.1.orig/docs/api/interfaces.rst 2013-08-01 18:04:28.000000000 +0000 +++ kazoo-1.2.1/docs/api/interfaces.rst 2014-04-13 07:24:49.000000000 +0000 @@ -16,7 +16,7 @@ interface, the :meth:`IHandler.async_result` method must be used instead of instantiating one directly. - .. autointerface:: IHandler + .. autoclass:: IHandler :members: Private API @@ -29,5 +29,5 @@ wishing to have their own callback called should use the :meth:`IAsyncResult.rawlink` method. - .. autointerface:: IAsyncResult + .. autoclass:: IAsyncResult :members: Index: kazoo-1.2.1/docs/conf.py =================================================================== --- kazoo-1.2.1.orig/docs/conf.py 2014-04-13 07:24:49.000000000 +0000 +++ kazoo-1.2.1/docs/conf.py 2014-04-13 07:24:49.000000000 +0000 @@ -41,7 +41,6 @@ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.viewcode', - 'repoze.sphinx.autointerface', ] # Add any paths that contain templates here, relative to this directory. Index: kazoo-1.2.1/kazoo/handlers/gevent.py =================================================================== --- kazoo-1.2.1.orig/kazoo/handlers/gevent.py 2013-08-01 18:04:28.000000000 +0000 +++ kazoo-1.2.1/kazoo/handlers/gevent.py 2014-04-13 07:24:49.000000000 +0000 @@ -14,11 +14,8 @@ from gevent.queue import Empty from gevent.queue import Queue from gevent import socket -from zope.interface import implementer from kazoo.handlers.utils import create_tcp_socket -from kazoo.interfaces import IAsyncResult -from kazoo.interfaces import IHandler _using_libevent = gevent.__version__.startswith('0.') @@ -26,10 +23,9 @@ _STOP = object() -AsyncResult = implementer(IAsyncResult)(gevent.event.AsyncResult) +AsyncResult = gevent.event.AsyncResult -@implementer(IHandler) class SequentialGeventHandler(object): """Gevent handler for sequentially executing callbacks. Index: kazoo-1.2.1/kazoo/handlers/threading.py =================================================================== --- kazoo-1.2.1.orig/kazoo/handlers/threading.py 2013-08-01 18:04:28.000000000 +0000 +++ kazoo-1.2.1/kazoo/handlers/threading.py 2014-04-13 07:37:36.909064870 +0000 @@ -23,12 +23,7 @@ import Queue except ImportError: # pragma: nocover import queue as Queue - -from zope.interface import implementer - from kazoo.handlers.utils import create_tcp_socket -from kazoo.interfaces import IAsyncResult -from kazoo.interfaces import IHandler # sentinel objects _NONE = object() @@ -41,7 +36,6 @@ pass -@implementer(IAsyncResult) class AsyncResult(object): """A one-time event that stores a value or an exception""" def __init__(self, handler): @@ -148,7 +142,6 @@ self._callbacks.remove(callback) -@implementer(IHandler) class SequentialThreadingHandler(object): """Threading handler for sequentially executing callbacks. Index: kazoo-1.2.1/kazoo/interfaces.py =================================================================== --- kazoo-1.2.1.orig/kazoo/interfaces.py 2013-08-01 18:04:28.000000000 +0000 +++ kazoo-1.2.1/kazoo/interfaces.py 2014-04-13 07:24:49.000000000 +0000 @@ -1,14 +1,18 @@ -"""Kazoo Interfaces""" -from zope.interface import ( - Attribute, - Interface, -) +"""Kazoo Interfaces + +.. versionchanged:: 1.4 + + The classes in this module used to be interface declarations based on + `zope.interface.Interface`. They were converted to normal classes and + now serve as documentation only. + +""" # public API -class IHandler(Interface): - """A Callback Handler for Zookeeper completion and watch callbacks +class IHandler(object): + """A Callback Handler for Zookeeper completion and watch callbacks. This object must implement several methods responsible for determining how completion / watch callbacks are handled as well as @@ -36,34 +40,34 @@ """Appropriate sleep function that can be called with a single argument and sleep.""") - def start(): + def start(self): """Start the handler, used for setting up the handler.""" - def stop(): + def stop(self): """Stop the handler. Should block until the handler is safely stopped.""" - def select(): + def select(self): """A select method that implements Python's select.select API""" - def socket(): + def socket(self): """A socket method that implements Python's socket.socket API""" - def event_object(): + def event_object(self): """Return an appropriate object that implements Python's threading.Event API""" - def lock_object(): + def lock_object(self): """Return an appropriate object that implements Python's threading.Lock API""" - def rlock_object(): + def rlock_object(self): """Return an appropriate object that implements Python's threading.RLock API""" - def async_result(): + def async_result(self): """Return an instance that conforms to the :class:`~IAsyncResult` interface appropriate for this handler""" @@ -79,7 +83,7 @@ """ - def dispatch_callback(callback): + def dispatch_callback(self, callback): """Dispatch to the callback object :param callback: A :class:`~kazoo.protocol.states.Callback` @@ -88,9 +92,9 @@ """ -class IAsyncResult(Interface): +class IAsyncResult(object): """An Async Result object that can be queried for a value that has - been set asynchronously + been set asynchronously. This object is modeled on the ``gevent`` AsyncResult object. @@ -99,24 +103,27 @@ Zookeeper thread which may require extra care under asynchronous environments. + .. attribute:: value + + Holds the value passed to :meth:`set` if :meth:`set` was + called. Otherwise `None`. + + .. attribute:: exception + + Holds the exception instance passed to :meth:`set_exception` + if :meth:`set_exception` was called. Otherwise `None`. + """ - value = Attribute( - """Holds the value passed to :meth:`set` if :meth:`set` was - called. Otherwise `None`""") - - exception = Attribute( - """Holds the exception instance passed to :meth:`set_exception` - if :meth:`set_exception` was called. Otherwise `None`""") - def ready(): + def ready(self): """Return `True` if and only if it holds a value or an exception""" - def successful(): + def successful(self): """Return `True` if and only if it is ready and holds a value""" - def set(value=None): + def set(self, value=None): """Store the value. Wake up the waiters. :param value: Value to store as the result. @@ -125,7 +132,7 @@ up. Sequential calls to :meth:`wait` and :meth:`get` will not block at all.""" - def set_exception(exception): + def set_exception(self, exception): """Store the exception. Wake up the waiters. :param exception: Exception to raise when fetching the value. @@ -134,7 +141,7 @@ up. Sequential calls to :meth:`wait` and :meth:`get` will not block at all.""" - def get(block=True, timeout=None): + def get(self, block=True, timeout=None): """Return the stored value or raise the exception :param block: Whether this method should block or return @@ -149,13 +156,13 @@ :meth:`set_exception` has been called or until the optional timeout occurs.""" - def get_nowait(): + def get_nowait(self): """Return the value or raise the exception without blocking. If nothing is available, raise the Timeout exception class on the associated :class:`IHandler` interface.""" - def wait(timeout=None): + def wait(self, timeout=None): """Block until the instance is ready. :param timeout: How long to wait for a value when `block` is @@ -167,7 +174,7 @@ :meth:`set_exception` has been called or until the optional timeout occurs.""" - def rawlink(callback): + def rawlink(self, callback): """Register a callback to call when a value or an exception is set @@ -179,7 +186,7 @@ """ - def unlink(callback): + def unlink(self, callback): """Remove the callback set by :meth:`rawlink` :param callback: A callback function to remove. Index: kazoo-1.2.1/requirements_sphinx.txt =================================================================== --- kazoo-1.2.1.orig/requirements_sphinx.txt 2013-08-01 18:04:28.000000000 +0000 +++ kazoo-1.2.1/requirements_sphinx.txt 2014-04-13 07:24:49.000000000 +0000 @@ -2,4 +2,3 @@ Pygments==1.5 Sphinx==1.1.3 docutils==0.9.1 -repoze.sphinx.autointerface==0.7.1 Index: kazoo-1.2.1/requirements.txt =================================================================== --- kazoo-1.2.1.orig/requirements.txt 2013-08-01 18:04:28.000000000 +0000 +++ kazoo-1.2.1/requirements.txt 2014-04-13 07:24:49.000000000 +0000 @@ -2,4 +2,3 @@ distribute==0.6.31 mock==1.0.1 nose==1.2.1 -zope.interface==4.0.3 Index: kazoo-1.2.1/setup.py =================================================================== --- kazoo-1.2.1.orig/setup.py 2013-08-01 18:04:28.000000000 +0000 +++ kazoo-1.2.1/setup.py 2014-04-13 07:24:49.000000000 +0000 @@ -14,9 +14,7 @@ PYTHON3 = sys.version_info > (3, ) PYPY = getattr(sys, 'pypy_version_info', False) and True or False -install_requires = [ - 'zope.interface >= 3.8.0', # has zope.interface.registry -] +install_requires = [] tests_require = install_requires + [ 'coverage', @@ -33,7 +31,6 @@ if on_rtd: install_requires.extend([ 'gevent', - 'repoze.sphinx.autointerface', ]) setup( debian/patches/series0000644000000000000000000000007712314052426012035 0ustar no-tag-build.patch fix-sys.path-for-sphinx.patch no-zope.patch debian/patches/fix-sys.path-for-sphinx.patch0000644000000000000000000000247612206716636016310 0ustar Description: Configure sys.path to allow autodoc to find Kazoo. Previously, if Kazoo wasn't already in sys.path otherwise (e.g. if not installed) sphinx autodoc wouldn't be able to find the module for documenting purposes because sphinx-build happens in an adjacent subdirectory. . This adds the docs folder's parent to the path so that autodoc can find the Kazoo module properly and do its stuff. Author: Neil Williams Forwarded: https://github.com/python-zk/kazoo/pull/114 Last-Update: 2013-08-25 Index: kazoo-1.2.1/docs/conf.py =================================================================== --- kazoo-1.2.1.orig/docs/conf.py 2013-08-26 07:29:43.000000000 +0000 +++ kazoo-1.2.1/docs/conf.py 2013-08-26 07:30:06.000000000 +0000 @@ -10,6 +10,7 @@ # # All configuration values have a default; values that are commented out # serve to show the default. +import os import sys @@ -27,7 +28,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +sys.path.insert(0, os.path.abspath('..')) # -- General configuration ----------------------------------------------------- debian/watch0000644000000000000000000000011212065534035010214 0ustar version=3 https://github.com/python-zk/kazoo/tags .*/(\d[\d\.]+)\.tar\.gz debian/compat0000644000000000000000000000000212065224076010370 0ustar 8 debian/control0000644000000000000000000000403412314307703010572 0ustar Source: kazoo Section: python Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Neil Williams Build-Depends: python-setuptools (>= 0.6b3), python-all (>= 2.6.6-3), debhelper (>= 8.0.0), python-sphinx (>= 1.0.7+dfsg) | python3-sphinx, python-gevent XS-Testsuite: autopkgtest Standards-Version: 3.9.4 Homepage: https://kazoo.readthedocs.org Package: python-kazoo Architecture: all Depends: ${python:Depends}, ${misc:Depends} Description: higher level API to Apache Zookeeper for Python clients Kazoo features: . * Support for gevent 0.13 and gevent 1.0b * Unified asynchronous API for use with greenlets or threads * Lock, Party, Election, and Partitioner recipe implementations (more implementations are in development) * Data and Children Watchers * Integrated testing helpers for Zookeeper clusters * Simplified Zookeeper connection state tracking * Pure-Python based implementation of the wire protocol, avoiding all the memory leaks, lacking features, and debugging madness of the C library . Kazoo is heavily inspired by Netflix Curator simplifications and helpers. Package: python-kazoo-doc Architecture: all Section: doc Depends: ${misc:Depends}, ${sphinxdoc:Depends} Description: API to Apache Zookeeper for Python clients. - API documentation Kazoo features: . * Support for gevent 0.13 and gevent 1.0b * Unified asynchronous API for use with greenlets or threads * Lock, Party, Election, and Partitioner recipe implementations (more implementations are in development) * Data and Children Watchers * Integrated testing helpers for Zookeeper clusters * Simplified Zookeeper connection state tracking * Pure-Python based implementation of the wire protocol, avoiding all the memory leaks, lacking features, and debugging madness of the C library . Kazoo is heavily inspired by Netflix Curator simplifications and helpers. . This package contains the API documentation. debian/changelog0000644000000000000000000000317212322440601011035 0ustar kazoo (1.2.1-1ubuntu4) trusty; urgency=low * Fix debian/patches/no-zope.patch even harder since it drops a needed import statement from kazoo/handlers/threading.py which causes multiple test failures due to tcp timeouts -- Scott Kitterman Sun, 13 Apr 2014 03:48:10 -0400 kazoo (1.2.1-1ubuntu3) trusty; urgency=medium * Fix syntax error in def spawn in kazoo/interfaces.py introduced by debian/patches/no-zope.patch (added in 1.2.1-1ubuntu1) so the package will be installable -- Scott Kitterman Sun, 13 Apr 2014 01:42:26 -0400 kazoo (1.2.1-1ubuntu2) trusty; urgency=medium * debian/rules: Fix FTBFS. -- Chuck Short Tue, 25 Mar 2014 10:16:42 -0400 kazoo (1.2.1-1ubuntu1) trusty; urgency=medium * debian/control: Dropped python-repoze.sphinx.autointerface. * debian/tests/*: Add dep8 tests. -- Chuck Short Mon, 24 Mar 2014 11:54:14 -0400 kazoo (1.2.1-1) unstable; urgency=low * New upstream release. * Fix sphinx documentation build on clean systems (added python-gevent to Build-Depends and patched config). * Bumped standards version to 3.9.4. No changes needed. -- Neil Williams Mon, 26 Aug 2013 06:26:20 +0000 kazoo (0.9-1) unstable; urgency=low * New upstream release. * Fix debian/copyright missing licenses for kazoo/tests/util.py and kazoo/testing/common.py. -- Neil Williams Mon, 18 Mar 2013 16:46:39 -0700 kazoo (0.8-1) unstable; urgency=low * Initial package. (Closes: #696511) -- Neil Williams Fri, 21 Dec 2012 19:27:43 -0800 debian/clean0000644000000000000000000000002112065762345010176 0ustar kazoo.egg-info/* debian/python-kazoo-doc.doc-base0000644000000000000000000000052412065772434014005 0ustar Document: python-kazoo-doc Title: Python Kazoo Documentation Author: Kazoo Team Section: Programming/Python Format: HTML Index: /usr/share/doc/python-kazoo-doc/html/index.html Files: /usr/share/doc/python-kazoo-doc/html/*.html /usr/share/doc/python-kazoo-doc/html/api/*.html /usr/share/doc/python-kazoo-doc/html/api/*/*.html debian/copyright0000644000000000000000000000520612121722732011123 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: kazoo Source: https://github.com/python-zk/kazoo Files: * Copyright: 2012 Kazoo Team License: Apache-2.0 See /usr/share/common-licenses/Apache-2.0 Files: debian/* Copyright: 2012 Neil Williams License: Apache-2.0 See /usr/share/common-licenses/Apache-2.0 Files: kazoo/testing/common.py Copyright: Canonical Ltd. License: LGPL-3+ See /usr/share/common-licenses/LGPL-3 Files: kazoo/tests/util.py Copyright: Zope Foundation and Contributors License: Zope-2.1 Zope Public License (ZPL) Version 2.1 . A copyright notice accompanies this license document that identifies the copyright holders. . This license has been certified as open source. It has also been designated as GPL compatible by the Free Software Foundation (FSF). . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. . 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. . 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright holders. Use of them is covered by separate agreement with the copyright holders. . 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. . Disclaimer . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/source/0000755000000000000000000000000012065224112010461 5ustar debian/source/format0000644000000000000000000000001412065224112011667 0ustar 3.0 (quilt) debian/python-kazoo-doc.docs0000644000000000000000000000001312065762501013243 0ustar build/html debian/python-kazoo.install0000644000000000000000000000002112065770143013216 0ustar usr/lib/python2* debian/tests/0000755000000000000000000000000012314066700010327 5ustar debian/tests/python-kazoo0000644000000000000000000000010512314066700012710 0ustar #!/bin/sh set -e -u export ZOOKEEPER_PATH=/usr/share/java nosetests debian/tests/control0000644000000000000000000000012712314055736011741 0ustar Tests: python-kazoo Depends: @, python-nose, zookeeper, libzookeeper-java, python-mock