diff --git a/readthedocs/extra/changelog.rst b/readthedocs/extra/changelog.rst index 0d5f42d4..38474cc4 100644 --- a/readthedocs/extra/changelog.rst +++ b/readthedocs/extra/changelog.rst @@ -14,6 +14,83 @@ it can take advantage of new goodies! .. contents:: List of All Versions +Connection Overhaul (v1.4) +========================== + +*Published at 2018/11/03* + +Yet again, a lot of work has been put into reworking the low level connection +classes. This means ``asyncio.open_connection`` is now used correctly and the +errors it can produce are handled properly. The separation between packing, +encrypting and network is now abstracted away properly, so reasoning about +the code is easier, making it more maintainable. + +As a user, you shouldn't worry about this, other than being aware that quite +a few changes were made in the insides of the library and you should report +any issues that you encounter with this version if any. + + +Breaking Changes +~~~~~~~~~~~~~~~~ + +* The threaded version of the library will no longer be maintained, primarily + because it never was properly maintained anyway. If you have old code, stick + with old versions of the library, such as ``0.19.1.6``. +* Timeouts no longer accept ``timedelta``. Simply use seconds. +* The ``callback`` parameter from `telethon.tl.custom.button.Button.inline()` + was removed, since it had always been a bad idea. Adding the callback there + meant a lot of extra work for every message sent, and only registering it + after the first message was sent! Instead, use + `telethon.events.callbackquery.CallbackQuery`. + + +Additions +~~~~~~~~~ + +* New `dialog.delete() ` method. +* New `conversation.cancel() + ` method. +* New ``retry_delay`` delay for the client to be used on auto-reconnection. + + +Bug fixes +~~~~~~~~~ + +* Fixed `Conversation.wait_event() + `. +* Fixed replying with photos/documents on inline results. +* `client.is_user_authorized() + ` now works + correctly after `client.log_out() + `. +* `dialog.is_group ` now works for + :tl:`ChatForbidden`. +* Not using ``async with`` when needed is now a proper error. +* `events.CallbackQuery ` + with string regex was not working properly. +* `client.get_entity('me') ` + now works again. +* Empty codes when signing in are no longer valid. +* Fixed file cache for in-memory sessions. + + +Enhancements +~~~~~~~~~~~~ + +* Support ``next_offset`` in `inline_query.answer() + `. +* Support ```` mentions in HTML parse mode. +* New auto-casts for :tl:`InputDocument` and :tl:`InputChatPhoto`. +* Conversations are now exclusive per-chat by default. +* The request that caused a RPC error is now shown in the error message. +* New full API examples in the generated documentation. +* Fixed some broken links in the documentation. +* `client.disconnect() + ` + is now synchronous, but you can still ``await`` it for consistency + or compatibility. + + Event Templates (v1.3) ====================== diff --git a/telethon/tl/custom/dialog.py b/telethon/tl/custom/dialog.py index bdf9faff..d71c8c3a 100644 --- a/telethon/tl/custom/dialog.py +++ b/telethon/tl/custom/dialog.py @@ -97,6 +97,10 @@ class Dialog: self.input_entity, *args, **kwargs) async def delete(self): + """ + Deletes the dialog from your dialog list. If you own the + channel this won't destroy it, only delete it from the list. + """ if self.is_channel: await self._client(functions.channels.LeaveChannelRequest( self.input_entity)) diff --git a/telethon/version.py b/telethon/version.py index c9e56415..1d06faa9 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.3' +__version__ = '1.4'