mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Avoid explicitly passing the loop to asyncio
This behaviour is deprecated and will be removed in future versions of Python. Technically, it could be considered a bug (invalid usage causing different behaviour from the expected one), and in practice it should not break much code (because .get_event_loop() would likely be the same event loop anyway).
This commit is contained in:
@@ -10,10 +10,10 @@ class RequestState:
|
||||
"""
|
||||
__slots__ = ('container_id', 'msg_id', 'request', 'data', 'future', 'after')
|
||||
|
||||
def __init__(self, request, loop, after=None):
|
||||
def __init__(self, request, after=None):
|
||||
self.container_id = None
|
||||
self.msg_id = None
|
||||
self.request = request
|
||||
self.data = bytes(request)
|
||||
self.future = asyncio.Future(loop=loop)
|
||||
self.future = asyncio.Future()
|
||||
self.after = after
|
||||
|
Reference in New Issue
Block a user