Update documentation with intersphinx and better summaries

This commit is contained in:
Lonami Exo
2019-06-11 11:09:22 +02:00
parent 31a26c0a0a
commit 51de0bd2da
19 changed files with 174 additions and 143 deletions

View File

@@ -1152,7 +1152,7 @@ reasons. But there's one more surprise!
There is a new magic ``telethon.sync`` module to let you use **all** the
methods in the :ref:`TelegramClient <telethon-client>` (and the types returned
from its functions) in a synchronous way, while using ``asyncio`` behind
from its functions) in a synchronous way, while using `asyncio` behind
the scenes! This means you're now able to do both of the following:
.. code-block:: python
@@ -1238,7 +1238,7 @@ Bug fixes
- "User joined" event was being treated as "User was invited".
- SQLite's cursor should not be closed properly after usage.
- ``await`` the updates task upon disconnection.
- Some bug in Python 3.5.2's ``asyncio`` causing 100% CPU load if you
- Some bug in Python 3.5.2's `asyncio` causing 100% CPU load if you
forgot to call `client.disconnect()
<telethon.client.telegrambaseclient.TelegramBaseClient.disconnect>`.
The method is called for you on object destruction, but you still should
@@ -1373,7 +1373,7 @@ Enhancements
- ``pathlib.Path`` is now supported for downloading and uploading media.
- Messages you send to yourself are now considered outgoing, unless they
are forwarded.
- The documentation has been updated with a brand new ``asyncio`` crash
- The documentation has been updated with a brand new `asyncio` crash
course to encourage you use it. You can still use the threaded version
if you want though.
- ``.name`` property is now properly supported when sending and downloading

View File

@@ -4,7 +4,7 @@
Compatibility and Convenience
=============================
Telethon is an ``asyncio`` library. Compatibility is an important concern,
Telethon is an `asyncio` library. Compatibility is an important concern,
and while it can't always be kept and mistakes happens, the :ref:`changelog`
is there to tell you when these important changes happen.
@@ -16,7 +16,7 @@ Compatibility
Some decisions when developing will inevitable be proven wrong in the future.
One of these decisions was using threads. Now that Python 3.4 is reaching EOL
and using ``asyncio`` is usable as of Python 3.5 it makes sense for a library
and using `asyncio` is usable as of Python 3.5 it makes sense for a library
like Telethon to make a good use of it.
If you have old code, **just use old versions** of the library! There is
@@ -34,7 +34,7 @@ and clean-ups. Using an older version is the right way to go.
Sometimes, other small decisions are made. These all will be reflected in the
:ref:`changelog` which you should read when upgrading.
If you want to jump the ``asyncio`` boat, here are some of the things you will
If you want to jump the `asyncio` boat, here are some of the things you will
need to start migrating really old code:
.. code-block:: python
@@ -91,7 +91,7 @@ Convenience
This makes the examples shorter and easier to think about.
For quick scripts that don't need updates, it's a lot more convenient to
forget about ``asyncio`` and just work with sequential code. This can prove
forget about `asyncio` and just work with sequential code. This can prove
to be a powerful hybrid for running under the Python REPL too.
.. code-block:: python
@@ -178,10 +178,10 @@ overhead you pay if you import it, and what you save if you don't.
Learning
========
You know the library uses ``asyncio`` everywhere, and you want to learn
how to do things right. Even though ``asyncio`` is its own topic, the
You know the library uses `asyncio` everywhere, and you want to learn
how to do things right. Even though `asyncio` is its own topic, the
documentation wants you to learn how to use Telethon correctly, and for
that, you need to use ``asyncio`` correctly too. For this reason, there
that, you need to use `asyncio` correctly too. For this reason, there
is a section called :ref:`mastering-asyncio` that will introduce you to
the ``asyncio`` world, with links to more resources for learning how to
the `asyncio` world, with links to more resources for learning how to
use it. Feel free to check that section out once you have read the rest.