From 9f01d368c008f8775a991ddf8226a15735bc8303 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 4 Apr 2021 16:18:24 +0200 Subject: refactor: remove the now obsolete future_wrapper and asyncio-related module --- slixmpp/xmlstream/asyncio.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 slixmpp/xmlstream/asyncio.py (limited to 'slixmpp/xmlstream/asyncio.py') 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 -- cgit v1.2.3