Add compatibility layer for run_coroutine_threadsafe.

This is a breaking change, since discord.utils.create_task is moved
to discord.compat.create_task.
This commit is contained in:
Rapptz
2016-04-25 20:52:16 -04:00
parent e0ca746ad4
commit fda0c8cea0
2 changed files with 131 additions and 4 deletions

View File

@ -236,7 +236,3 @@ def _bytes_to_base64_data(data):
def to_json(obj):
return json.dumps(obj, separators=(',', ':'), ensure_ascii=True)
try:
create_task = asyncio.ensure_future
except AttributeError:
create_task = asyncio.async