diff --git a/telethon/client/telegrambaseclient.py b/telethon/client/telegrambaseclient.py index 4c3b567c..370f228d 100644 --- a/telethon/client/telegrambaseclient.py +++ b/telethon/client/telegrambaseclient.py @@ -320,9 +320,6 @@ class TelegramBaseClient(abc.ABC): self.api_id = int(api_id) self.api_hash = api_hash - if inspect.iscoroutinefunction(self.session.process_entities): - self._log[__name__].warning('Using async sessions support is an experimental feature') - # Current proxy implementation requires `sock_connect`, and some # event loops lack this method. If the current loop is missing it, # bail out early and suggest an alternative. diff --git a/telethon/utils.py b/telethon/utils.py index d4553b6d..74f7988e 100644 --- a/telethon/utils.py +++ b/telethon/utils.py @@ -14,6 +14,7 @@ import os import pathlib import re import struct +import warnings from collections import namedtuple from mimetypes import guess_extension from types import GeneratorType @@ -1562,5 +1563,6 @@ def _photo_size_byte_count(size): async def maybe_async(coro): result = coro if inspect.isawaitable(result): + warnings.warn('Using async sessions support is an experimental feature') result = await result return result