Description: Remove repoze.sphinx-interface
Author: Chuck Short <zulcss@ubuntu.com>
Fowarded: Not-needed (https://github.com/python-zk/kazoo/issues/131)
Index: kazoo-1.3.1/docs/api/interfaces.rst
===================================================================
--- kazoo-1.3.1.orig/docs/api/interfaces.rst
+++ kazoo-1.3.1/docs/api/interfaces.rst
@@ -16,7 +16,7 @@ If the developer needs to use objects im
 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 @@ instead of taking a completion callback
 wishing to have their own callback called should use the
 :meth:`IAsyncResult.rawlink` method.
 
-  .. autointerface:: IAsyncResult
+  .. autoclass:: IAsyncResult
      :members:
Index: kazoo-1.3.1/docs/conf.py
===================================================================
--- kazoo-1.3.1.orig/docs/conf.py
+++ kazoo-1.3.1/docs/conf.py
@@ -41,7 +41,6 @@ extensions = [
     '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.3.1/kazoo/handlers/gevent.py
===================================================================
--- kazoo-1.3.1.orig/kazoo/handlers/gevent.py
+++ kazoo-1.3.1/kazoo/handlers/gevent.py
@@ -14,11 +14,8 @@ import gevent.thread
 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, create_tcp_connection
-from kazoo.interfaces import IAsyncResult
-from kazoo.interfaces import IHandler
 
 _using_libevent = gevent.__version__.startswith('0.')
 
@@ -26,10 +23,9 @@ log = logging.getLogger(__name__)
 
 _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.3.1/kazoo/handlers/threading.py
===================================================================
--- kazoo-1.3.1.orig/kazoo/handlers/threading.py
+++ kazoo-1.3.1/kazoo/handlers/threading.py
@@ -23,12 +23,7 @@ try:
     import Queue
 except ImportError:  # pragma: nocover
     import queue as Queue
-
-from zope.interface import implementer
-
 from kazoo.handlers.utils import create_tcp_socket, create_tcp_connection
-from kazoo.interfaces import IAsyncResult
-from kazoo.interfaces import IHandler
 
 # sentinel objects
 _NONE = object()
@@ -41,7 +36,6 @@ class TimeoutError(Exception):
     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 @@ class AsyncResult(object):
                 self._callbacks.remove(callback)
 
 
-@implementer(IHandler)
 class SequentialThreadingHandler(object):
     """Threading handler for sequentially executing callbacks.
 
Index: kazoo-1.3.1/kazoo/interfaces.py
===================================================================
--- kazoo-1.3.1.orig/kazoo/interfaces.py
+++ kazoo-1.3.1/kazoo/interfaces.py
@@ -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,43 +40,43 @@ class IHandler(Interface):
         """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 create_connection():
+    def create_connection(self):
         """A socket method that implements Python's
         socket.create_connection 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"""
 
-    def spawn(func, *args, **kwargs):
+    def spawn(self, func, *args, **kwargs):
         """Spawn a function to run asynchronously
 
         :param args: args to call the function with.
@@ -83,7 +87,7 @@ class IHandler(Interface):
 
         """
 
-    def dispatch_callback(callback):
+    def dispatch_callback(self, callback):
         """Dispatch to the callback object
 
         :param callback: A :class:`~kazoo.protocol.states.Callback`
@@ -92,9 +96,9 @@ class IHandler(Interface):
         """
 
 
-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.
 
@@ -103,24 +107,27 @@ class IAsyncResult(Interface):
     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.
@@ -129,7 +136,7 @@ class IAsyncResult(Interface):
         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.
@@ -138,7 +145,7 @@ class IAsyncResult(Interface):
         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
@@ -153,13 +160,13 @@ class IAsyncResult(Interface):
         :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
@@ -171,7 +178,7 @@ class IAsyncResult(Interface):
         :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
 
@@ -183,7 +190,7 @@ class IAsyncResult(Interface):
 
         """
 
-    def unlink(callback):
+    def unlink(self, callback):
         """Remove the callback set by :meth:`rawlink`
 
         :param callback: A callback function to remove.
Index: kazoo-1.3.1/requirements_sphinx.txt
===================================================================
--- kazoo-1.3.1.orig/requirements_sphinx.txt
+++ kazoo-1.3.1/requirements_sphinx.txt
@@ -2,4 +2,3 @@ Jinja2==2.7.1
 Pygments==1.6
 Sphinx==1.1.3
 docutils==0.11
-repoze.sphinx.autointerface==0.7.1
Index: kazoo-1.3.1/requirements.txt
===================================================================
--- kazoo-1.3.1.orig/requirements.txt
+++ kazoo-1.3.1/requirements.txt
@@ -2,4 +2,3 @@ coverage==3.6
 distribute==0.6.31
 mock==1.0.1
 nose==1.3.0
-zope.interface==4.0.5
Index: kazoo-1.3.1/setup.py
===================================================================
--- kazoo-1.3.1.orig/setup.py
+++ kazoo-1.3.1/setup.py
@@ -14,9 +14,7 @@ with open(os.path.join(here, 'CHANGES.rs
 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 @@ on_rtd = os.environ.get('READTHEDOCS', N
 if on_rtd:
     install_requires.extend([
         'gevent',
-        'repoze.sphinx.autointerface',
     ])
 
 setup(
