Telethon

Latest version: v1.35.0

Safety actively analyzes 629564 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 7

0.12.2

Since the Content Distributed Network (CDN) is not handled by Telegram itself, the owners may tamper these files. Telegram sends their sha256 sum for clients to implement this additional verification step, which now the library has. If any CDN has altered the file you're trying to download, `CdnFileTamperedError` will be raised to let you know.

Besides this. `TLObject.stringify()` was showing bytes as lists (now fixed) and RPC errors are reported by default:
> In an attempt to help everyone who works with the Telegram API, Telethon will by default report all Remote Procedure Call errors to [PWRTelegram](https://pwrtelegram.xyz/), a public database anyone can query, made by [Daniil](https://github.com/danog). All the information sent is a GET request with the error code, error message and method used.
>
> If you still would like to opt out, simply set client.session.report_errors = False to disable this feature. However Daniil would really thank you if you helped him (and everyone) by keeping it on!

0.12.1

The biggest news for this update are that downloading media from CDN's (you'll often encounter this when working with popular channels) now **works**.

Some bug fixes:
* The method used to download documents crashed because two lines were swapped.
* Determining the right path when downloading any file was very weird, now it's been enhanced.
* The `.sign_in()` method didn't support integer values for the code! Now it does again.

Some important internal changes are that the old way to deal with RSA public keys now uses a different module instead the old strange hand-crafted version.

Hope the new, super simple `README.rst` encourages people to use Telethon and make it better with either suggestions, or pull request. Pull requests are *super* appreciated, but showing some support by leaving a star also feels nice ⭐️

0.12

<table><tr><td>Scheme layer used: <code>70</code></td></tr></table>

This update is overall an attempt to make Telethon a bit more user friendly, along with some other stability enhancements, although it brings quite a few changes.

Things that will probably break your code
* The `TelegramClient` methods `.send_photo_file()`, `.send_document_file()` and `.send_media_file()` are now a **single method** called `.send_file()`. It's also important to note that the **order** of the parameters has been **swapped**: first to *who* you want to send it, then the file itself.

* The same applies to `.download_msg_media()`, which has been renamed to `.download_media()`. The method now supports a `Message` itself too, rather than only `Message.media`. The specialized `.download_photo()`, `.download_document()` and `.download_contact()` still exist, but are private.

More new stuff
* Updated to **layer 70**!
* Both downloading and uploading now support **stream-like objects**.
* A lot **faster initial connection** if `sympy` is installed (can be installed through `pip`).
* `libssl` will also be used if available on your system (likely on Linux based systems). This speed boost should also apply to uploading and downloading files.
* You can use a **phone number** or an **username** for methods like `.send_message()`, `.send_file()`, and all the other quick-access methods provided by the `TelegramClient`.

Bug fixes
* Crashing when migrating to a new layer and receiving old updates should not happen now.
* `InputPeerChannel` is now casted to `InputChannel` automtically too.
* `.get_new_msg_id()` should now be thread-safe. No promises.
* Logging out on macOS caused a crash, which should be gone now.
* More checks to ensure that the connection is flagged correctly as either connected or not.

Bug additions
* Downloading files from CDN's will **not work** yet (something new that comes with layer 70).

---

That's it, any new idea or suggestion about how to make the project even more friendly is highly appreciated.

P.S.: Did you know that you can pretty print any result Telegram returns (called `TLObject`'s) by using their `.stringify()` function? Great for debugging!

0.11.5

Quick fix-up of a bug which hadn't been encountered until now. Auto-cast by using `get_input_*` now works.

0.11.4

<table><tr><td>Scheme layer used: <code>68</code></td></tr></table>

For some reason, Telegram doesn't have enough with the [`InputPeer`](https://lonamiwebs.github.io/Telethon/types/input_peer.html). There also exist [`InputChannel`](https://lonamiwebs.github.io/Telethon/types/input_channel.html) and [`InputUser`](https://lonamiwebs.github.io/Telethon/types/input_user.html)! You don't have to worry about those anymore, it's handled internally now.

Besides this, every Telegram object now features a new default `.__str__` look, and also a [`.stringify()` method](https://github.com/LonamiWebs/Telethon/commit/8fd0d7eadd944ff42e18aaf06228adc7aba794b5) to pretty format them, if you ever need to inspect them.

The library now uses [the `DEBUG` level](https://github.com/LonamiWebs/Telethon/commit/1f7ac7118750ed84e2165dce9c6aca2e6ea0c6a4) everywhere, so no more warnings or information messages if you had logging enabled.

The `no_webpage` parameter from `.send_message` [has been renamed](https://github.com/LonamiWebs/Telethon/commit/0119a006585acd1a1a9a8901a21bb2f193142cfe) to `link_preview` for clarity, so now it does the opposite (but has a clearer intention).

0.11.3

A very quick follow-up release to fix a tiny bug with `.send_message()`, no new features.

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.