Compare commits
10 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| df2018b73b | |||
| f793ffa213 | |||
| 0a8a3350f4 | |||
| f91e4b7ce4 | |||
| 5c02443afc | |||
| 1d327cf138 | |||
| 289ff766bf | |||
| f1295c4008 | |||
| 129930cb4e | |||
| f0f6d1024c |
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:1534dbda5d16a509bdc934a7d4bbfba4473ba08b27143e0fe70aacf1f7be50e0
|
|
||||||
size 491933
|
|
||||||
3
Telethon-1.40.0.tar.gz
Normal file
3
Telethon-1.40.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:aa7f64cf732f22f51ebbad35a6528c411c1ac178e8eb26ec4947314ddb2e9475
|
||||||
|
size 510419
|
||||||
@@ -1,3 +1,109 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 30 02:43:53 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.40.0:
|
||||||
|
* Additions
|
||||||
|
+ send_as and effect added to send_message and related methods.
|
||||||
|
+ MessageMediaGeoLive is now recognized for auto-input conversion.
|
||||||
|
* Enhancements
|
||||||
|
+ Improved wording when using a likely unintended session file.
|
||||||
|
+ Improved behaviour for matching Markdown links.
|
||||||
|
+ A truly clean update-state is now fetched upon login.
|
||||||
|
+ Time offset is now updated more reliably after connecting. This should
|
||||||
|
fix legitimate “message too old/new” issues.
|
||||||
|
* Bug fixes
|
||||||
|
+ ChannelParticipantLeft is now skipped in iter_participants.
|
||||||
|
+ spoiler flag was lost on MessageMediaPhoto auto-input conversion.
|
||||||
|
+ KeyboardButtonCopy is now recognized as an inline button.
|
||||||
|
+ Downloading web-documents should now work again. Note that this still
|
||||||
|
fetches the file from the original server.
|
||||||
|
- Add patch stop-using-event_loop-fixture.patch:
|
||||||
|
* Stop using removed event_loop fixture.
|
||||||
|
- Support both upper and lower case metadata directory names.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 26 00:56:52 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Lowercase metadata directory name.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 17 13:11:04 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.39.0
|
||||||
|
* fix(session): persist session after `session.set_dc`
|
||||||
|
* Update to layer 195
|
||||||
|
* Avoid error when trying to reset deadline for no msgbox entries
|
||||||
|
* Updated to Layer 196 (#4525)
|
||||||
|
* Add missing parameters to Message constructor (#4529)
|
||||||
|
* Fix IOError with some image modes in photo resize This fixes image
|
||||||
|
compression with mode "P" (potentially others) which is necessary
|
||||||
|
as the server has erroneous alpha color with some types of images
|
||||||
|
(mode "P" for example). This also properly applies the background
|
||||||
|
argument that may be passed to _resize_photo_if_needed by always
|
||||||
|
compressing images with alpha regardless of whether the server
|
||||||
|
will compress the image for us.
|
||||||
|
* Document drop_author and add drop_media_captions drop_author is
|
||||||
|
already supported but is undocumented. drop_media_captions for
|
||||||
|
consistency with drop_author being implemented.
|
||||||
|
* Respect receive_updates=False
|
||||||
|
* Improve edit_message message type hint This also allows
|
||||||
|
utils.get_message_id to get the ID of InputMessageID.
|
||||||
|
* Update to layer 198
|
||||||
|
* Unconditionally match text and link text in markdown Fixes cases
|
||||||
|
where there's a nested [] in the text by matching until "](" is
|
||||||
|
reached. This doesn't match newlines in URLs because that makes
|
||||||
|
no sense.
|
||||||
|
* Fix overlapping URLs and improve overlapping in md Also remove the
|
||||||
|
unused overlap function.
|
||||||
|
* Make markdown URL regex less greedy Fixes multiple URLs in a single
|
||||||
|
message.
|
||||||
|
* fix: support batch sending of image URLs and video URLs in albums
|
||||||
|
* Consider range list-like This allows you to pass range() to things
|
||||||
|
such as get_messages as ids= without first explicitly converting it
|
||||||
|
to a list.
|
||||||
|
* Update to layer 199
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 13 19:50:54 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.38.1
|
||||||
|
* Fix Python 3.6 compatibility
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 21 09:29:35 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 1.38.0:
|
||||||
|
* Formatting entities misbehaved with albums.
|
||||||
|
* Sending a Message object with a file did not use the new file.
|
||||||
|
- update to 1.37.0:
|
||||||
|
* Support for CDN downloads should be back. Telethon still
|
||||||
|
prefers no CDN by default.
|
||||||
|
* FloodWaitPremium should now be handled like any other floodwaits.
|
||||||
|
* Fixed edge-case when using get_messages(..., reverse=True).
|
||||||
|
* ConnectionError when using proxies should be raised properly.
|
||||||
|
- update to 1.36.0:
|
||||||
|
* Certain updates, such as :tl:`UpdateBotStopped`, should now be
|
||||||
|
processed reliably.
|
||||||
|
- update to 1.35.0:
|
||||||
|
* "Custom secret support" should work with TcpMTProxy.
|
||||||
|
* Some type hints should now be more accurate.
|
||||||
|
* Session path couldn't be a pathlib.Path or None.
|
||||||
|
* Python versions older than 3.9 should now be supported again.
|
||||||
|
* Readthedocs should hopefully build the v1 documentation again.
|
||||||
|
- update to 1.34.0:
|
||||||
|
* reply_to_chat and reply_to_sender are now in Message.
|
||||||
|
* parse_mode with a custom instance containing both parse and
|
||||||
|
unparse should now work.
|
||||||
|
* Parsing and unparsing message entities should now behave better
|
||||||
|
in certain corner-cases.
|
||||||
|
- update to 1.33.0:
|
||||||
|
* webbrowser is now imported conditionally, to support niche environments.
|
||||||
|
Library should now retry on the suddenly-common TimedOutError.
|
||||||
|
- update to 1.32.0:
|
||||||
|
* new and changed raw API methods
|
||||||
|
- update to 1.31.0:
|
||||||
|
* dropped imghdr support to prepare for python 3.12
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 20 02:49:49 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
|
Wed Sep 20 02:49:49 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||||
|
|
||||||
@@ -9,7 +115,7 @@ Wed Sep 20 02:49:49 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 5 19:32:14 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
Mon Dec 5 19:32:14 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||||
|
|
||||||
- Update to version 1.26.0
|
- Update to version 1.26.0
|
||||||
* Bump to v1.26 and update layer to 149
|
* Bump to v1.26 and update layer to 149
|
||||||
Sort updates preemptively
|
Sort updates preemptively
|
||||||
Closes #3936.
|
Closes #3936.
|
||||||
@@ -23,7 +129,7 @@ Mon Dec 5 19:32:14 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 27 21:22:55 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
Thu Oct 27 21:22:55 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||||
|
|
||||||
- Update to 1.25.4
|
- Update to 1.25.4
|
||||||
* Revert accidental NO_UPDATES_TIMEOUT
|
* Revert accidental NO_UPDATES_TIMEOUT
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
@@ -69,12 +175,12 @@ Thu Sep 22 21:31:48 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
|||||||
* Prevent double-logging of 'timeout for updates'
|
* Prevent double-logging of 'timeout for updates'
|
||||||
* Support sending 4GB files (#3891)
|
* Support sending 4GB files (#3891)
|
||||||
* Add ENTITY_BOUNDS_INVALID and POSTPONED_TIMEOUT to known errors (#3887)
|
* Add ENTITY_BOUNDS_INVALID and POSTPONED_TIMEOUT to known errors (#3887)
|
||||||
* Fix HTML/MD parser producing empty MessageEntity (#3885)
|
* Fix HTML/MD parser producing empty MessageEntity (#3885)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 29 03:58:55 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
Mon Aug 29 03:58:55 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||||
|
|
||||||
- Update to 1.24.0
|
- Update to 1.24.0
|
||||||
* No changelog
|
* No changelog
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
@@ -126,7 +232,7 @@ Mon Jun 14 13:51:37 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
|||||||
have.
|
have.
|
||||||
- If you want the old behaviour of no messages being logged,
|
- If you want the old behaviour of no messages being logged,
|
||||||
you can configure logging to CRITICAL severity:
|
you can configure logging to CRITICAL severity:
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
logging.basicConfig(level=logging.CRITICAL)
|
logging.basicConfig(level=logging.CRITICAL)
|
||||||
|
|
||||||
@@ -285,7 +391,7 @@ Wed Oct 21 03:32:46 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
|||||||
+ Manually using client.sign_up <telethon.client.auth.AuthMethods.sign_up> should now work correctly, instead of claiming "code invalid".
|
+ 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:
|
+ 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`.
|
+ The thumb for download_media now supports both str and :tl:`VideoSize`.
|
||||||
+ Thumbnails are sorted, so -1 is always the largest.
|
+ Thumbnails are sorted, so -1 is always the largest.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 11 02:24:22 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
Fri Sep 11 02:24:22 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
@@ -314,4 +420,4 @@ Fri Feb 28 14:15:21 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 27 13:15:34 UTC 2020 - Dead Mozay <dead_mozay@opensuse.org>
|
Thu Feb 27 13:15:34 UTC 2020 - Dead Mozay <dead_mozay@opensuse.org>
|
||||||
|
|
||||||
- Initial package
|
- Initial package
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-Telethon
|
# spec file for package python-Telethon
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,17 +16,18 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
# Python2 is not supported
|
|
||||||
%define skip_python2 1
|
|
||||||
%define modname Telethon
|
%define modname Telethon
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-Telethon
|
Name: python-Telethon
|
||||||
Version: 1.30.3
|
Version: 1.40.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Full-featured Telegram client library for Python 3
|
Summary: Full-featured Telegram client library for Python 3
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/LonamiWebs/Telethon
|
URL: https://github.com/LonamiWebs/Telethon
|
||||||
Source: https://github.com/LonamiWebs/%{modname}/archive/refs/tags/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
Source: https://github.com/LonamiWebs/%{modname}/archive/refs/tags/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM gh#LonamiWebs/Telethon#4670
|
||||||
|
Patch0: stop-using-event_loop-fixture.patch
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pyaes}
|
BuildRequires: %{python_module pyaes}
|
||||||
BuildRequires: %{python_module pytest-asyncio}
|
BuildRequires: %{python_module pytest-asyncio}
|
||||||
BuildRequires: %{python_module pytest-tornasync}
|
BuildRequires: %{python_module pytest-tornasync}
|
||||||
@@ -34,6 +35,7 @@ BuildRequires: %{python_module pytest-trio}
|
|||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module rsa}
|
BuildRequires: %{python_module rsa}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-pyaes
|
Requires: python-pyaes
|
||||||
@@ -42,27 +44,28 @@ BuildArch: noarch
|
|||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%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).
|
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
|
%prep
|
||||||
%setup -q -n Telethon-%{version}
|
%autosetup -p1 -n Telethon-%{version}
|
||||||
chmod 644 *.rst LICENSE
|
chmod -x *.rst LICENSE
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# test_all_methods_present needs readthedocs available
|
# test_all_methods_present needs readthedocs available
|
||||||
%pytest -k 'not test_all_methods_present'
|
%pytest -k 'not (test_all_methods_present or test_send_msg_and_file)'
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitelib}/telethon
|
%{python_sitelib}/telethon
|
||||||
%{python_sitelib}/Telethon-%{version}-py*.egg-info
|
%{python_sitelib}/[Tt]elethon-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
50
stop-using-event_loop-fixture.patch
Normal file
50
stop-using-event_loop-fixture.patch
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
From 8e2a46568ef9193f5887aea1abf919ac4ca6d31e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steve Kowalik <steven@wedontsleep.org>
|
||||||
|
Date: Wed, 30 Jul 2025 12:31:14 +1000
|
||||||
|
Subject: [PATCH] Stop using the event_loop fixture
|
||||||
|
|
||||||
|
pytest-asyncio has deprecated (and in 1.0, removed) the event_loop
|
||||||
|
fixture, which is only used for one testcase. Use the get_running_loop()
|
||||||
|
helper function instead.
|
||||||
|
---
|
||||||
|
tests/telethon/test_helpers.py | 12 ++++++------
|
||||||
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/telethon/test_helpers.py b/tests/telethon/test_helpers.py
|
||||||
|
index 47705ca25..3dffdf66d 100644
|
||||||
|
--- a/tests/telethon/test_helpers.py
|
||||||
|
+++ b/tests/telethon/test_helpers.py
|
||||||
|
@@ -39,9 +39,9 @@ def test_strip_text():
|
||||||
|
|
||||||
|
class TestSyncifyAsyncContext:
|
||||||
|
class NoopContextManager:
|
||||||
|
- def __init__(self, loop):
|
||||||
|
+ def __init__(self):
|
||||||
|
self.count = 0
|
||||||
|
- self.loop = loop
|
||||||
|
+ self.loop = helpers.get_running_loop()
|
||||||
|
|
||||||
|
async def __aenter__(self):
|
||||||
|
self.count += 1
|
||||||
|
@@ -54,8 +54,8 @@ async def __aexit__(self, exc_type, *args):
|
||||||
|
__enter__ = helpers._sync_enter
|
||||||
|
__exit__ = helpers._sync_exit
|
||||||
|
|
||||||
|
- def test_sync_acontext(self, event_loop):
|
||||||
|
- contm = self.NoopContextManager(event_loop)
|
||||||
|
+ def test_sync_acontext(self):
|
||||||
|
+ contm = self.NoopContextManager()
|
||||||
|
assert contm.count == 0
|
||||||
|
|
||||||
|
with contm:
|
||||||
|
@@ -64,8 +64,8 @@ def test_sync_acontext(self, event_loop):
|
||||||
|
assert contm.count == 0
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
- async def test_async_acontext(self, event_loop):
|
||||||
|
- contm = self.NoopContextManager(event_loop)
|
||||||
|
+ async def test_async_acontext(self):
|
||||||
|
+ contm = self.NoopContextManager()
|
||||||
|
assert contm.count == 0
|
||||||
|
|
||||||
|
async with contm:
|
||||||
Reference in New Issue
Block a user