diff --git a/readthedocs/misc/changelog.rst b/readthedocs/misc/changelog.rst index de58fa32..9a3b6074 100644 --- a/readthedocs/misc/changelog.rst +++ b/readthedocs/misc/changelog.rst @@ -13,6 +13,121 @@ it can take advantage of new goodies! .. contents:: List of All Versions +Documentation Overhaul (v1.8) +============================= + +*Published at 2019/05/30* + ++------------------------+ +| Scheme layer used: 100 | ++------------------------+ + +The documentation has been completely reworked from the ground up, +with awesome new quick references such as :ref:`client-ref` to help +you quickly find what you need! + +Raw methods also warn you when a friendly variant is available, so +that you don't accidentally make your life harder than it has to be. + +In addition, all methods in the client now are fully annotated with type +hints! More work needs to be done, but this should already help a lot when +using Telethon from any IDEs. + +You may have noticed that the patch versions between ``v1.7.2`` to ``v1.7.7`` +have not been documented. This is because patch versions should only contain +bug fixes, no new features or breaking changes. This hasn't been the case in +the past, but from now on, the library will try to adhere more strictly to +the `Semantic Versioning `_ principles. + +If you ever want to look at those bug fixes, please use the appropriated +``git`` command, such as ``git shortlog v1.7.1...v1.7.4``, but in general, +they probably just fixed your issue. + +With that out of the way, let's look at the full change set: + + +Breaking Changes +~~~~~~~~~~~~~~~~ + +* The layer changed, so take note if you use the raw API, as it's usual. +* The way photos are downloaded changed during the layer update of the + previous version, and fixing that bug as a breaking change in itself. + `client.download_media() ` + now offers a different way to deal with thumbnails. + + +Additions +~~~~~~~~~ + +* New `Message.file ` property! + Now you can trivially access `message.file.id ` + to get the file ID of some media, or even ``print(message.file.name)``. +* Archiving dialogs with `Dialog.archive() ` + or `client.edit_folder() ` + is now possible. +* New cleaned-up method to stream downloads with `client.iter_download() + `, which offers + a lot of flexibility, such as arbitrary offsets for efficient seeking. +* `Dialog.delete() ` has existed + for a while, and now `client.delete_dialog() + ` exists too so you + can easily leave chats or delete dialogs without fetching all dialogs. +* Some people or chats have a lot of profile photos. You can now iterate + over all of them with the new `client.iter_profile_photos() + ` method. +* You can now annoy everyone with the new `Message.pin(notify=True) + `! The client has its own + variant too, called `client.pin_message() + `. + + +Bug fixes +~~~~~~~~~ + +* Correctly catch and raise all RPC errors. +* Downloading stripped photos wouldn't work correctly. +* Under some systems, ``libssl`` would fail to load earlier than + expected, causing the library to fail when being imported. +* `conv.get_response() ` + after ID 0 wasn't allowed when it should. +* `InlineBuilder ` only worked + with local files, but files from anywhere are supported. +* Accessing the text property from a raw-API call to fetch :tl:`Message` would fail + (any any other property that needed the client). +* Database is now upgraded if the version was lower, not different. + From now on, this should help with upgrades and downgrades slightly. +* Fixed saving ``pts`` and session-related stuff. +* Disconnection should not raise any errors. +* Invite links of the form ``tg://join?invite=`` now work. +* `client.iter_participants(search=...) ` + now works on private chats again. +* Iterating over messages in reverse with a date as offset wouldn't work. +* The conversation would behave weirdly when a timeout occurred. + + +Enhancements +~~~~~~~~~~~~ + +* ``telethon`` now re-export all the goodies that you commonly need when + using the library, so e.g. ``from telethon import Button`` will now work. +* ``telethon.sync`` now re-exports everything from ``telethon``, so that + you can trivially import from just one place everything that you need. +* More attempts at reducing CPU usage after automatically fetching missing + entities on events. This isn't a big deal, even if it sounds like one. +* Hexadecimal invite links are now supported. You didn't need them, but + they will now work. + +Internal Changes +~~~~~~~~~~~~~~~~ + +* Deterministic code generation. This is good for ``diff``. +* On Python 3.7 and above, we properly close the connection. +* A lot of micro-optimization. +* Fixes to bugs introduced while making this release. +* Custom commands on ``setup.py`` are nicer to use. + + + Fix-up for Photo Downloads (v1.7.1) =================================== diff --git a/readthedocs/quick-references/objects-reference.rst b/readthedocs/quick-references/objects-reference.rst index 45d086a4..211b16cf 100644 --- a/readthedocs/quick-references/objects-reference.rst +++ b/readthedocs/quick-references/objects-reference.rst @@ -239,6 +239,45 @@ can find the individual results: download_media +Dialog +====== + +The `Dialog ` object is returned when +you call `client.iter_dialogs() `. + +.. currentmodule:: telethon.tl.custom.dialog.Dialog + +.. autosummary:: + :nosignatures: + + send_message + archive + delete + + +Draft +====== + +The `Draft ` object is returned when +you call `client.iter_drafts() `. + +.. currentmodule:: telethon.tl.custom.draft.Draft + +.. autosummary:: + :nosignatures: + + entity + input_entity + get_entity + get_input_entity + text + raw_text + is_empty + set_message + send + delete + + Utils ===== diff --git a/telethon/version.py b/telethon/version.py index 325308ba..b41dc04d 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.7.7' +__version__ = '1.8.0'