From 8b1bfcdf9ca3a9f605fc753d38c1c02bace2d71b Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Tue, 30 Aug 2022 12:57:34 +0200 Subject: [PATCH] Bump to v1.25 --- README.rst | 2 +- readthedocs/misc/changelog.rst | 34 ++++++++++++++++++++++++++ telethon/client/users.py | 2 +- telethon/version.py | 2 +- telethon_examples/README.md | 2 +- telethon_generator/data/errors.csv | 3 ++- telethon_generator/data/html/core.html | 4 +-- telethon_generator/data/methods.csv | 1 + telethon_generator/generators/docs.py | 2 +- 9 files changed, 44 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index f1eb902c..dbb56295 100755 --- a/README.rst +++ b/README.rst @@ -75,7 +75,7 @@ useful information. .. _asyncio: https://docs.python.org/3/library/asyncio.html .. _MTProto: https://core.telegram.org/mtproto .. _Telegram: https://telegram.org -.. _Compatibility and Convenience: https://docs.telethon.dev/en/latest/misc/compatibility-and-convenience.html +.. _Compatibility and Convenience: https://docs.telethon.dev/en/stable/misc/compatibility-and-convenience.html .. _Read The Docs: https://docs.telethon.dev .. |logo| image:: logo.svg diff --git a/readthedocs/misc/changelog.rst b/readthedocs/misc/changelog.rst index 112aa117..c5043637 100644 --- a/readthedocs/misc/changelog.rst +++ b/readthedocs/misc/changelog.rst @@ -13,6 +13,40 @@ it can take advantage of new goodies! .. contents:: List of All Versions +Update handling overhaul (v1.25) +================================ + ++------------------------+ +| Scheme layer used: 144 | ++------------------------+ + +I had plans to release v2 way earlier, but my motivation drained off, so that +didn't happen. The reason for another v1 release is that there was a clear +need to fix some things regarding update handling (which were present in v2). +I did not want to make this release. But with the release date for v2 still +being unclear, I find it necessary to release another v1 version. I apologize +for the delay (I should've done this a lot sooner but didn't because in my +head I would've pushed through and finished v2, but I underestimated how much +work that was and I probably experienced burn-out). + +I still don't intend to make new additions to the v1 series (beyond updating +the Telegram layer being used). I still have plans to finish v2 some day. +But in the meantime, new features, such as reactions, will have to be used +through raw API. + +This update also backports the update overhaul from v2. If you experience +issues with updates, please report them on the GitHub page for the project. +However, this new update handling should be more reliable, and ``catch_up`` +should actually work properly. + +Breaking Changes +~~~~~~~~~~~~~~~~ + +* In order for ``catch_up`` to work (new flag in the ``TelegramClient`` + constructor), sessions need to impleemnt the new ``get_update_states``. + Third-party session storages won't have this implemented by the time + this version released, so ``catch_up`` may not work with those. + Rushed release to fix login (v1.24) =================================== diff --git a/telethon/client/users.py b/telethon/client/users.py index 22db969e..85f8ff03 100644 --- a/telethon/client/users.py +++ b/telethon/client/users.py @@ -465,7 +465,7 @@ class UserMethods: raise ValueError( 'Could not find the input entity for {} ({}). Please read https://' - 'docs.telethon.dev/en/latest/concepts/entities.html to' + 'docs.telethon.dev/en/stable/concepts/entities.html to' ' find out more details.' .format(peer, type(peer).__name__) ) diff --git a/telethon/version.py b/telethon/version.py index 68e59657..65d47684 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.24.0' +__version__ = '1.25.0' diff --git a/telethon_examples/README.md b/telethon_examples/README.md index 9543e755..72b206bb 100644 --- a/telethon_examples/README.md +++ b/telethon_examples/README.md @@ -164,4 +164,4 @@ It makes use of the ["raw API"](https://tl.telethon.dev) (that is, no friendly ` [`asyncio`]: https://docs.python.org/3/library/asyncio.html [`tkinter`]: https://docs.python.org/3/library/tkinter.html [tkinter GUI]: https://raw.githubusercontent.com/LonamiWebs/Telethon/master/telethon_examples/screenshot-gui.jpg -[`events.NewMessage`]: https://docs.telethon.dev/en/latest/modules/events.html#telethon.events.newmessage.NewMessage +[`events.NewMessage`]: https://docs.telethon.dev/en/stable/modules/events.html#telethon.events.newmessage.NewMessage diff --git a/telethon_generator/data/errors.csv b/telethon_generator/data/errors.csv index 027c56d6..685a8023 100644 --- a/telethon_generator/data/errors.csv +++ b/telethon_generator/data/errors.csv @@ -162,6 +162,7 @@ GROUPCALL_NOT_MODIFIED,400, GROUPED_MEDIA_INVALID,400,Invalid grouped media GROUP_CALL_INVALID,400,Group call invalid HASH_INVALID,400,The provided hash is invalid +HIDE_REQUESTER_MISSING,400, HISTORY_GET_FAILED,500,Fetching of history failed IMAGE_PROCESS_FAILED,400,Failure while processing image IMPORT_FILE_INVALID,400,The file is too large to be imported @@ -213,7 +214,7 @@ MESSAGE_IDS_EMPTY,400,No message ids were provided MESSAGE_ID_INVALID,400,"The specified message ID is invalid or you can't do that operation on such message" MESSAGE_NOT_MODIFIED,400,Content of the message was not modified MESSAGE_POLL_CLOSED,400,The poll was closed and can no longer be voted on -MESSAGE_TOO_LONG,400,Message was too long. Current maximum length is 4096 UTF-8 characters +MESSAGE_TOO_LONG,400,Message was too long METHOD_INVALID,400,The API method is invalid and cannot be used MSGID_DECREASE_RETRY,500,The request should be retried with a lower message ID MSG_ID_INVALID,400,The message ID used in the peer was invalid diff --git a/telethon_generator/data/html/core.html b/telethon_generator/data/html/core.html index 80c4c75d..daa8500f 100644 --- a/telethon_generator/data/html/core.html +++ b/telethon_generator/data/html/core.html @@ -54,7 +54,7 @@ users.getUsers#0d91a548 id:Vector<InputUser> = Vector<User>

This is not Python code. It's the "TL definition". It's an easy-to-read line that gives a quick overview on the parameters and its result. You don't need to worry about this. See - Understanding + Understanding the Type Language for more details on it.

Index

@@ -170,7 +170,7 @@ users.getUsers#0d91a548 id:Vector<InputUser> = Vector<User> not always run. They are just there to show the right syntax.

You should check out - how + how to access the full API in ReadTheDocs.

diff --git a/telethon_generator/data/methods.csv b/telethon_generator/data/methods.csv index f2a86f82..da3769eb 100644 --- a/telethon_generator/data/methods.csv +++ b/telethon_generator/data/methods.csv @@ -249,6 +249,7 @@ messages.getSuggestedDialogFilters,user, messages.getUnreadMentions,user,PEER_ID_INVALID messages.getWebPage,user,WC_CONVERT_URL_INVALID messages.getWebPagePreview,user,ENTITY_BOUNDS_INVALID +messages.hideAllChatJoinRequests,user,HIDE_REQUESTER_MISSING messages.hidePeerSettingsBar,user, messages.importChatInvite,user,CHANNELS_TOO_MUCH INVITE_HASH_EMPTY INVITE_HASH_EXPIRED INVITE_HASH_INVALID SESSION_PASSWORD_NEEDED USERS_TOO_MUCH USER_ALREADY_PARTICIPANT messages.initHistoryImport,user,IMPORT_FILE_INVALID IMPORT_FORMAT_UNRECOGNIZED PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN TIMEOUT diff --git a/telethon_generator/generators/docs.py b/telethon_generator/generators/docs.py index af6ebff7..a276e170 100755 --- a/telethon_generator/generators/docs.py +++ b/telethon_generator/generators/docs.py @@ -381,7 +381,7 @@ def _write_html_pages(tlobjects, methods, layer, input_res): ns, friendly = tlobject.friendly docs.write_text( 'Please refer to the documentation of client.{1}() ' 'to learn about the parameters and see several code ' 'examples on how to use it.'