15
0

Accepting request 1296402 from devel:languages:python

- 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.

OBS-URL: https://build.opensuse.org/request/show/1296402
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Telethon?expand=0&rev=15
This commit is contained in:
2025-07-30 09:45:57 +00:00
committed by Git OBS Bridge
5 changed files with 82 additions and 7 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2d9ad3989cb73f2b3b387352a87f1ca561dae5f2d9c607499244e0a11bf9e77c
size 509308

3
Telethon-1.40.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aa7f64cf732f22f51ebbad35a6528c411c1ac178e8eb26ec4947314ddb2e9475
size 510419

View File

@@ -1,3 +1,26 @@
-------------------------------------------------------------------
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>

View File

@@ -19,12 +19,14 @@
%define modname Telethon
%{?sle15_python_module_pythons}
Name: python-Telethon
Version: 1.39.0
Version: 1.40.0
Release: 0
Summary: Full-featured Telegram client library for Python 3
License: MIT
URL: https://github.com/LonamiWebs/Telethon
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 pytest-asyncio}
@@ -46,7 +48,7 @@ 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}
%autosetup -p1 -n Telethon-%{version}
chmod -x *.rst LICENSE
%build
@@ -58,12 +60,12 @@ chmod -x *.rst LICENSE
%check
# 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}
%doc README.rst
%license LICENSE
%{python_sitelib}/telethon
%{python_sitelib}/telethon-%{version}.dist-info
%{python_sitelib}/[Tt]elethon-%{version}.dist-info
%changelog

View 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: