Enabled tests on Python 3.13, disabled on Python 3.8 (#1589)

* Try to enable tests on Python 3.13

* Remove support for Python 3.8 and PyPy 3.8

Dropped Python 3.8 and PyPy 3.8 from the CI workflow and updated the minimum required Python version to 3.9 in pyproject.toml. Also updated dependencies and tools to align with the new minimum Python version.

* Added changelog

* Reformat code

* Bump mypy python version
This commit is contained in:
Alex Root Junior 2024-10-19 14:55:38 +03:00 committed by GitHub
parent 1dbdcf0516
commit 51beb48257
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 86 additions and 51 deletions

View file

@ -248,13 +248,16 @@ class TestAiohttpSession:
async with AiohttpSession() as session:
assert isinstance(session, AsyncContextManager)
with patch(
"aiogram.client.session.aiohttp.AiohttpSession.create_session",
new_callable=AsyncMock,
) as mocked_create_session, patch(
"aiogram.client.session.aiohttp.AiohttpSession.close",
new_callable=AsyncMock,
) as mocked_close:
with (
patch(
"aiogram.client.session.aiohttp.AiohttpSession.create_session",
new_callable=AsyncMock,
) as mocked_create_session,
patch(
"aiogram.client.session.aiohttp.AiohttpSession.close",
new_callable=AsyncMock,
) as mocked_close,
):
async with session as ctx:
assert session == ctx
mocked_close.assert_awaited_once()