Cleanup for stow ---STOW
[dotfiles/.git] / .local / lib / python2.7 / site-packages / pynvim / msgpack_rpc / event_loop / __init__.py
diff --git a/.local/lib/python2.7/site-packages/pynvim/msgpack_rpc/event_loop/__init__.py b/.local/lib/python2.7/site-packages/pynvim/msgpack_rpc/event_loop/__init__.py
new file mode 100644 (file)
index 0000000..50f704e
--- /dev/null
@@ -0,0 +1,24 @@
+"""Event loop abstraction subpackage.
+
+Tries to use pyuv as a backend, falling back to the asyncio implementation.
+"""
+
+from pynvim.compat import IS_PYTHON3
+
+# on python3 we only support asyncio, as we expose it to plugins
+if IS_PYTHON3:
+    from pynvim.msgpack_rpc.event_loop.asyncio import AsyncioEventLoop
+    EventLoop = AsyncioEventLoop
+else:
+    try:
+        # libuv is fully implemented in C, use it when available
+        from pynvim.msgpack_rpc.event_loop.uv import UvEventLoop
+        EventLoop = UvEventLoop
+    except ImportError:
+        # asyncio(trollius on python 2) is pure python and should be more
+        # portable across python implementations
+        from pynvim.msgpack_rpc.event_loop.asyncio import AsyncioEventLoop
+        EventLoop = AsyncioEventLoop
+
+
+__all__ = ('EventLoop')