2020-02-28 14:14:27 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-Telethon
|
|
|
|
|
#
|
2020-02-28 14:15:41 +00:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2020-02-28 14:14:27 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2020-02-28 14:15:41 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
2020-02-28 14:14:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
|
# Python2 is not supported
|
|
|
|
|
%define skip_python2 1
|
|
|
|
|
Name: python-Telethon
|
- Update to 1.17.0:
* Breaking Changes
+ Message.from_id is now a :tl:`Peer`, not int! If you want the marked sender ID (much like old behaviour), replace all uses of .from_id with .sender_id. This will mostly work, but of course in old and new versions you have to account for the fact that this sender may no longer be a user.
+ You can no longer assign to Message.reply_to_msg_id <telethon.tl.custom.message.Message.reply_to_msg_id> and Message.to_id <telethon.tl.custom.message.Message.to_id> because these are now properties that offer a "view" to the real value from a different field.
+ Answering inline queries with a photo or document will now send the photo or document used in the resulting message by default. Not sending the media was technically a bug, but some people may be relying on this old behaviour. You can use the old behaviour with include_media=False.
* Additions
+ New raise_last_call_error parameter in the client constructor to raise the same error produced by the last failing call, rather than a generic ValueError.
+ New formatting_entities parameter in client.send_message() <telethon.client.messages.MessageMethods.send_message>, and client.send_file() <telethon.client.uploads.UploadMethods.send_file> to bypass the parse mode and manually specify the formatting entities.
+ New client.get_permissions() <telethon.client.chats.ChatMethods.get_permissions> method to query a participant's permissions in a group or channel. This request is slightly expensive in small group chats because it has to fetch the entire chat to check just a user, so use of a cache is advised.
+ Message.click() <telethon.tl.custom.message.Message.click> now works on normal polls!
+ New local_addr parameter in the client constructor to use a specific local network address when connecting to Telegram.
+ client.inline_query() <telethon.client.bots.BotMethods.inline_query> now lets you specify the chat where the query is being made from, which some bots need to provide certain functionality.
+ You can now get comments in a channel post with the reply_to parameter in client.iter_messages() <telethon.client.messages.MessageMethods.iter_messages>. Comments are messages that "reply to" a specific channel message, hence the name (which is consistent with how Telegram's API calls it).
* Enhancements
+ Updated documentation and list of known errors.
+ If hachoir is available, the file metadata can now be extracted from streams and in-memory bytes.
+ The default parameters used to initialize a connection now match the format of those used by Telegram Desktop.
+ Specifying 0 retries will no longer cause the library to attempt to reconnect.
+ The library should now be able to reliably download very large files.
+ Global search should work more reliably now.
+ Old usernames are evicted from cache, so getting entities by cached username should now be more reliable.
+ Slightly less noisy logs.
+ Stability regarding transport-level errors (transport flood, authorization key not found) should be improved. In particular, you should no longer be getting unnecessarily logged out.
+ Reconnection should no longer occur if the client gets logged out (for example, another client revokes the session).
+ Bug fixes
+ In some cases, there were issues when using events.Album <telethon.events.album.Album> together with events.Raw <telethon.events.raw.Raw>.
+ For some channels, one of their channel photos would not show up in client.iter_profile_photos() <telethon.client.chats.ChatMethods.iter_profile_photos>.
+ In some cases, a request that failed to be sent would be forgotten, causing the original caller to be "locked" forever for a response that would never arrive. Failing requests should now consistently be automatically re-sent.
+ The library should more reliably handle certain updates with "empty" data.
+ Sending documents in inline queries should now work fine.
+ Manually using client.sign_up <telethon.client.auth.AuthMethods.sign_up> should now work correctly, instead of claiming "code invalid".
+ Special mention to some of the other changes in the 1.16.x series:
+ The thumb for download_media now supports both str and :tl:`VideoSize`.
+ Thumbnails are sorted, so -1 is always the largest.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Telethon?expand=0&rev=10
2020-10-21 03:35:25 +00:00
|
|
|
Version: 1.17.0
|
2020-02-28 14:14:27 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Full-featured Telegram client library for Python 3
|
2020-02-28 14:15:41 +00:00
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/LonamiWebs/Telethon
|
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/T/Telethon/Telethon-%{version}.tar.gz
|
2020-02-28 14:14:27 +00:00
|
|
|
BuildRequires: %{python_module pyaes}
|
|
|
|
|
BuildRequires: %{python_module pytest-asyncio}
|
|
|
|
|
BuildRequires: %{python_module pytest-tornasync}
|
2020-02-28 14:15:41 +00:00
|
|
|
BuildRequires: %{python_module pytest-trio}
|
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
BuildRequires: %{python_module rsa}
|
2020-02-28 14:14:27 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: fdupes
|
2020-02-28 14:15:41 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-02-28 14:42:24 +00:00
|
|
|
Requires: python-pyaes
|
2020-02-28 14:15:41 +00:00
|
|
|
Requires: python-rsa
|
2020-02-28 14:14:27 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Telethon is an asyncio Python 3 MTProto library to interact with Telegram's API as a user or through a bot account (bot API alternative).
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n Telethon-%{version}
|
|
|
|
|
find {README.rst,LICENSE} -type f -perm /111 -exec chmod 644 {} \;
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
2020-02-28 14:35:51 +00:00
|
|
|
%python_expand rm -r %{buildroot}%{$python_sitelib}/tests
|
2020-02-28 14:14:27 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
2020-02-28 14:35:51 +00:00
|
|
|
# test_all_methods_present needs readthedocs available
|
|
|
|
|
%pytest -k 'not test_all_methods_present'
|
2020-02-28 14:14:27 +00:00
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
|
|
%changelog
|