Make more emphasis in the magic sync module

This commit is contained in:
Lonami Exo 2018-06-25 21:33:44 +02:00
parent fc834f60fb
commit 184240953d
2 changed files with 19 additions and 3 deletions

View File

@ -8,9 +8,9 @@ Telethon
<https://docs.python.org/3/library/asyncio.html>`_ **Python 3** library <https://docs.python.org/3/library/asyncio.html>`_ **Python 3** library
to interact with Telegram's API. to interact with Telegram's API.
If you don't like ``asyncio``, you can still use `a simpler version **If you're upgrading from Telethon pre-1.0 to 1.0, please make sure to read**
<https://github.com/LonamiWebs/Telethon/tree/sync>`_ that uses threads instead. `this section of the documentation
<https://telethon.readthedocs.io/en/latest/extra/basic/asyncio-magic.html>`_.
What is this? What is this?
------------- -------------

View File

@ -4,6 +4,22 @@
Magic with asyncio Magic with asyncio
================== ==================
.. important::
TL; DR; If you've upgraded to Telethon 1.0 from a previous version
**and you're not using events or updates**, add this line:
.. code-block:: python
import telethon.sync
At the beginning of your main script and you will be good. If you
do use updates or events, keep reading, or use `a simpler version
<https://github.com/LonamiWebs/Telethon/tree/sync>`_ (discouraged).
You might also want to check the :ref:`changelog`.
The sync module The sync module
*************** ***************