mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 19:03:46 +03:00
Update to version 1.20
This commit is contained in:
parent
4c771bf2af
commit
d9691c9342
|
@ -14,6 +14,74 @@ it can take advantage of new goodies!
|
||||||
.. contents:: List of All Versions
|
.. contents:: List of All Versions
|
||||||
|
|
||||||
|
|
||||||
|
New schema and QoL improvements (v1.20)
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
+------------------------+
|
||||||
|
| Scheme layer used: 124 |
|
||||||
|
+------------------------+
|
||||||
|
|
||||||
|
`View new and changed raw API methods <https://diff.telethon.dev/?from=122&to=124>`__.
|
||||||
|
|
||||||
|
A bit late to the party, but Telethon now offers a convenient way to comment
|
||||||
|
on channel posts. It works very similar to ``reply_to``:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
client.send_message(channel, 'Great update!', comment_to=1134)
|
||||||
|
|
||||||
|
This code will leave a comment to the channel post with ID ``1134`` in
|
||||||
|
``channel``.
|
||||||
|
|
||||||
|
In addition, the library now logs warning or error messages to ``stderr`` by
|
||||||
|
default! You no longer should be left wondering "why isn't my event handler
|
||||||
|
working" if you forgot to configure logging. It took so long for this change
|
||||||
|
to arrive because nobody noticed that Telethon was using a
|
||||||
|
``logging.NullHandler`` when it really shouldn't have.
|
||||||
|
|
||||||
|
If you want the old behaviour of no messages being logged, you can configure
|
||||||
|
`logging` to ``CRITICAL`` severity:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
import logging
|
||||||
|
logging.basicConfig(level=logging.CRITICAL)
|
||||||
|
|
||||||
|
This is not considered a breaking change because ``stderr`` should only be
|
||||||
|
used for logging purposes, not to emit information others may consume (use
|
||||||
|
``stdout`` for that).
|
||||||
|
|
||||||
|
Additions
|
||||||
|
~~~~~~~~~
|
||||||
|
|
||||||
|
* New ``comment_to`` parameter in `client.send_message()
|
||||||
|
<telethon.client.messages.MessageMethods.send_message>`, and
|
||||||
|
`client.send_file() <telethon.client.uploads.UploadMethods.send_file>`
|
||||||
|
to comment on channel posts.
|
||||||
|
|
||||||
|
Enhancements
|
||||||
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
|
* ``utils.resolve_invite_link`` handles the newer link format.
|
||||||
|
* Downloading files now retries once on `TimeoutError`, which has been
|
||||||
|
happening recently. It is not guaranteed to work, but it should help.
|
||||||
|
* Sending albums of photo URLs is now supported.
|
||||||
|
* EXIF metadata is respected when automatically resizing photos, so the
|
||||||
|
orientation information should no longer be lost.
|
||||||
|
* Downloading a thumbnail by index should now use the correct size ordering.
|
||||||
|
|
||||||
|
Bug fixes
|
||||||
|
~~~~~~~~~
|
||||||
|
|
||||||
|
* Fixed a `KeyError` on certain cases with ``Conversation``.
|
||||||
|
* Thumbnails should properly render on more clients. Installing ``hachoir``
|
||||||
|
may help.
|
||||||
|
* Message search was broken when using a certain combination of parameters.
|
||||||
|
* ``utils.resolve_id`` was misbehaving with some identifiers.
|
||||||
|
* Fix ``TypeNotFoundError`` was not being propagated, causing deadlocks.
|
||||||
|
* Invoking multiple requests at once with ``ordered=True`` was deadlocking.
|
||||||
|
|
||||||
|
|
||||||
New raw API call methods (v1.19)
|
New raw API call methods (v1.19)
|
||||||
================================
|
================================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Versions should comply with PEP440.
|
# Versions should comply with PEP440.
|
||||||
# This line is parsed in setup.py:
|
# This line is parsed in setup.py:
|
||||||
__version__ = '1.19.1'
|
__version__ = '1.20'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user