From d9691c934290a9578bfdcf2bcda3df1cad3a959c Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sat, 27 Feb 2021 16:24:39 +0100 Subject: [PATCH] Update to version 1.20 --- readthedocs/misc/changelog.rst | 68 ++++++++++++++++++++++++++++++++++ telethon/version.py | 2 +- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/readthedocs/misc/changelog.rst b/readthedocs/misc/changelog.rst index 3b51a431..8420560a 100644 --- a/readthedocs/misc/changelog.rst +++ b/readthedocs/misc/changelog.rst @@ -14,6 +14,74 @@ it can take advantage of new goodies! .. contents:: List of All Versions +New schema and QoL improvements (v1.20) +======================================= + ++------------------------+ +| Scheme layer used: 124 | ++------------------------+ + +`View new and changed raw API methods `__. + +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() + `, and + `client.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) ================================ diff --git a/telethon/version.py b/telethon/version.py index f1b68a12..bc924feb 100644 --- a/telethon/version.py +++ b/telethon/version.py @@ -1,3 +1,3 @@ # Versions should comply with PEP440. # This line is parsed in setup.py: -__version__ = '1.19.1' +__version__ = '1.20'