Make readthedocs build run without warnings

This commit is contained in:
Lonami Exo 2018-03-21 08:55:13 +01:00
parent 987cf41ec6
commit 89ae0cb164
3 changed files with 30 additions and 28 deletions

View File

@ -1,3 +1,5 @@
.. _entities:
========================= =========================
Users, Chats and Channels Users, Chats and Channels
========================= =========================

View File

@ -993,7 +993,7 @@ Bug fixes and enhancements (v0.13.3)
.. bugs-fixed-2: .. bugs-fixed-2:
Bug fixes Bug fixes
--------- ~~~~~~~~~
- **Reconnection** used to fail because it tried invoking things from - **Reconnection** used to fail because it tried invoking things from
the ``ReadThread``. the ``ReadThread``.
@ -1009,7 +1009,7 @@ Bug fixes
.. enhancements-3: .. enhancements-3:
Enhancements Enhancements
------------ ~~~~~~~~~~~~
- **Request will be retried** up to 5 times by default rather than - **Request will be retried** up to 5 times by default rather than
failing on the first attempt. failing on the first attempt.
@ -1099,7 +1099,7 @@ outside the buffer.
.. additions-2: .. additions-2:
Additions Additions
--------- ~~~~~~~~~
- The mentioned different connection modes, and a new thread. - The mentioned different connection modes, and a new thread.
- You can modify the ``Session`` attributes through the - You can modify the ``Session`` attributes through the
@ -1112,7 +1112,7 @@ Additions
.. enhancements-4: .. enhancements-4:
Enhancements Enhancements
------------ ~~~~~~~~~~~~
- The low-level socket doesn't use a handcrafted timeout anymore, which - The low-level socket doesn't use a handcrafted timeout anymore, which
should benefit by avoiding the arbitrary ``sleep(0.1)`` that there should benefit by avoiding the arbitrary ``sleep(0.1)`` that there
@ -1121,7 +1121,7 @@ Enhancements
``code`` was provided. ``code`` was provided.
Deprecation Deprecation
----------- ~~~~~~~~~~~
- ``.sign_up`` does *not* take a ``phone`` argument anymore. Change - ``.sign_up`` does *not* take a ``phone`` argument anymore. Change
this or you will be using ``phone`` as ``code``, and it will fail! this or you will be using ``phone`` as ``code``, and it will fail!
@ -1201,7 +1201,7 @@ friendly, along with some other stability enhancements, although it
brings quite a few changes. brings quite a few changes.
Breaking changes Breaking changes
---------------- ~~~~~~~~~~~~~~~~
- The ``TelegramClient`` methods ``.send_photo_file()``, - The ``TelegramClient`` methods ``.send_photo_file()``,
``.send_document_file()`` and ``.send_media_file()`` are now a ``.send_document_file()`` and ``.send_media_file()`` are now a
@ -1216,7 +1216,7 @@ Breaking changes
``.download_contact()`` still exist, but are private. ``.download_contact()`` still exist, but are private.
Additions Additions
--------- ~~~~~~~~~
- Updated to **layer 70**! - Updated to **layer 70**!
- Both downloading and uploading now support **stream-like objects**. - Both downloading and uploading now support **stream-like objects**.
@ -1232,7 +1232,7 @@ Additions
.. bug-fixes-5: .. bug-fixes-5:
Bug fixes Bug fixes
--------- ~~~~~~~~~
- Crashing when migrating to a new layer and receiving old updates - Crashing when migrating to a new layer and receiving old updates
should not happen now. should not happen now.
@ -1372,7 +1372,7 @@ Support for parallel connections (v0.11)
**read the whole change log**! **read the whole change log**!
Breaking changes Breaking changes
---------------- ~~~~~~~~~~~~~~~~
- Every Telegram error has now its **own class**, so it's easier to - Every Telegram error has now its **own class**, so it's easier to
fine-tune your ``except``\ 's. fine-tune your ``except``\ 's.
@ -1384,7 +1384,7 @@ Breaking changes
anymore. anymore.
Additions Additions
--------- ~~~~~~~~~
- A new, more **lightweight class** has been added. The - A new, more **lightweight class** has been added. The
``TelegramBareClient`` is now the base of the normal ``TelegramBareClient`` is now the base of the normal
@ -1404,7 +1404,7 @@ Additions
.. bug-fixes-6: .. bug-fixes-6:
Bug fixes Bug fixes
--------- ~~~~~~~~~
- Received errors are acknowledged to the server, so they don't happen - Received errors are acknowledged to the server, so they don't happen
over and over. over and over.
@ -1418,7 +1418,7 @@ Bug fixes
not happen anymore. not happen anymore.
Internal changes Internal changes
---------------- ~~~~~~~~~~~~~~~~
- Some fixes to the ``JsonSession``. - Some fixes to the ``JsonSession``.
- Fixed possibly crashes if trying to ``.invoke()`` a ``Request`` while - Fixed possibly crashes if trying to ``.invoke()`` a ``Request`` while

View File

@ -1095,22 +1095,22 @@ class MessageDeleted(_EventBuilder):
class StopPropagation(Exception): class StopPropagation(Exception):
""" """
If this Exception is found to be raised in any of the handlers for a If this exception is raised in any of the handlers for a given event,
given update, it will stop the execution of all other registered it will stop the execution of all other registered event handlers.
event handlers in the chain. It can be seen as the ``StopIteration`` in a for loop but for events.
Think of it like a ``StopIteration`` exception in a for loop.
Example usage: Example usage:
``` >>> @client.on(events.NewMessage)
@client.on(events.NewMessage) ... def delete(event):
def delete(event): ... event.delete()
event.delete() ... # No other event handler will have a chance to handle this event
# Other handlers won't have an event to work with ... raise StopPropagation
raise StopPropagation ...
>>> @client.on(events.NewMessage)
@client.on(events.NewMessage) ... def _(event):
def _(event): ... # Will never be reached, because it is the second handler
# Will never be reached, because it is the second handler in the chain. ... pass
pass
```
""" """
# For some reason Sphinx wants the silly >>> or
# it will show warnings and look bad when generated.
pass