summaryrefslogtreecommitdiff
path: root/slixmpp/xmlstream
diff options
context:
space:
mode:
Diffstat (limited to 'slixmpp/xmlstream')
-rw-r--r--slixmpp/xmlstream/asyncio.py22
-rw-r--r--slixmpp/xmlstream/xmlstream.py2
2 files changed, 1 insertions, 23 deletions
diff --git a/slixmpp/xmlstream/asyncio.py b/slixmpp/xmlstream/asyncio.py
deleted file mode 100644
index b42b366a..00000000
--- a/slixmpp/xmlstream/asyncio.py
+++ /dev/null
@@ -1,22 +0,0 @@
-"""
-asyncio-related utilities
-"""
-
-import asyncio
-from functools import wraps
-
-def future_wrapper(func):
- """
- Make sure the result of a function call is an asyncio.Future()
- object.
- """
- @wraps(func)
- def wrapper(*args, **kwargs):
- result = func(*args, **kwargs)
- if isinstance(result, asyncio.Future):
- return result
- future = asyncio.Future()
- future.set_result(result)
- return future
-
- return wrapper
diff --git a/slixmpp/xmlstream/xmlstream.py b/slixmpp/xmlstream/xmlstream.py
index 8d90abf8..45d814fd 100644
--- a/slixmpp/xmlstream/xmlstream.py
+++ b/slixmpp/xmlstream/xmlstream.py
@@ -27,11 +27,11 @@ import ssl
import weakref
import uuid
+import asyncio
from asyncio import iscoroutinefunction, wait, Future
from contextlib import contextmanager
import xml.etree.ElementTree as ET
-from slixmpp.xmlstream.asyncio import asyncio
from slixmpp.xmlstream import tostring
from slixmpp.xmlstream.stanzabase import StanzaBase, ElementBase
from slixmpp.xmlstream.resolver import resolve, default_resolver