This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asvetlov
Recipients asvetlov, heckad, yselivanov
Date 2020-01-29.13:13:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580303626.14.0.492715136901.issue39483@roundup.psfhosted.org>
In-reply-to
Content
-1.
I rather suggest updating telethon example in the following matter:

async with main():
    with TelegramClient('anon', api_id, api_hash) as client:
        await client.send_message('me', 'Hello, myself!')

You PR brings more problems than fixes: the loop is closed after the first usage, the next call with the same loop fails.
I don't think that we should support such tricky mode.
History
Date User Action Args
2020-01-29 13:13:46asvetlovsetrecipients: + asvetlov, yselivanov, heckad
2020-01-29 13:13:46asvetlovsetmessageid: <1580303626.14.0.492715136901.issue39483@roundup.psfhosted.org>
2020-01-29 13:13:46asvetlovlinkissue39483 messages
2020-01-29 13:13:46asvetlovcreate