mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Support of Py3.14 (#1730)
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.14) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.14) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.14) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
Some checks failed
Tests / tests (macos-latest, 3.10) (push) Has been cancelled
Tests / tests (macos-latest, 3.11) (push) Has been cancelled
Tests / tests (macos-latest, 3.12) (push) Has been cancelled
Tests / tests (macos-latest, 3.13) (push) Has been cancelled
Tests / tests (macos-latest, 3.14) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / tests (ubuntu-latest, 3.14) (push) Has been cancelled
Tests / tests (windows-latest, 3.10) (push) Has been cancelled
Tests / tests (windows-latest, 3.11) (push) Has been cancelled
Tests / tests (windows-latest, 3.12) (push) Has been cancelled
Tests / tests (windows-latest, 3.13) (push) Has been cancelled
Tests / tests (windows-latest, 3.14) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (macos-latest, pypy3.11) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.10) (push) Has been cancelled
Tests / pypy-tests (ubuntu-latest, pypy3.11) (push) Has been cancelled
* Py3.14 support Bump .pre-commit-config.yaml Bump `mongo` feature deps Bump `proxy` feature dep Bump `test` feature deps Bump `dev` feature deps Set `aiohttp` max version `<3.14` Fix `test_isolation.py` tests Fix `test_storages.py` tests Add Py version limit `<3.15` (breaking changes possible) Add new `uvloop` starter to `Dispatcher.run_polling` Remove old `uvloop` `set_event_loop_policy` Remove `pytest-lazy-fixture` * Make `test` and `dev` features deps strong fixed * Add 1730.feature.rst * Remove unneeded `None` from `Dispatcher.run_polling` * Fix `macos-latest-pypy3.11` test `test_aiohtt_server.py` * Update `tests.yml` * Update `tests.yml`
This commit is contained in:
parent
0c6a705310
commit
4caf56814e
10 changed files with 77 additions and 64 deletions
|
|
@ -39,7 +39,7 @@ def pytest_configure(config):
|
|||
config.addinivalue_line("markers", "redis: marked tests require redis connection to run")
|
||||
config.addinivalue_line("markers", "mongo: marked tests require mongo connection to run")
|
||||
|
||||
if sys.platform == "win32":
|
||||
if sys.platform == "win32" and sys.version_info < (3, 14):
|
||||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||
else:
|
||||
asyncio.set_event_loop_policy(asyncio.DefaultEventLoopPolicy())
|
||||
|
|
@ -186,6 +186,16 @@ async def dispatcher():
|
|||
await dp.emit_shutdown()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def storage(request):
|
||||
return request.getfixturevalue(request.param)
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def isolation(request):
|
||||
return request.getfixturevalue(request.param)
|
||||
|
||||
|
||||
# @pytest.fixture(scope="session")
|
||||
# def event_loop_policy(request):
|
||||
# if sys.platform == "win32":
|
||||
|
|
|
|||
|
|
@ -8,11 +8,8 @@ from aiogram.fsm.storage.redis import RedisEventIsolation, RedisStorage
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
"isolation",
|
||||
[
|
||||
pytest.lazy_fixture("redis_isolation"),
|
||||
pytest.lazy_fixture("lock_isolation"),
|
||||
pytest.lazy_fixture("disabled_isolation"),
|
||||
],
|
||||
["redis_isolation", "lock_isolation", "disabled_isolation"],
|
||||
indirect=True,
|
||||
)
|
||||
class TestIsolations:
|
||||
async def test_lock(
|
||||
|
|
|
|||
|
|
@ -8,12 +8,8 @@ from aiogram.fsm.storage.base import BaseStorage, StorageKey
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
"storage",
|
||||
[
|
||||
pytest.lazy_fixture("redis_storage"),
|
||||
pytest.lazy_fixture("mongo_storage"),
|
||||
pytest.lazy_fixture("pymongo_storage"),
|
||||
pytest.lazy_fixture("memory_storage"),
|
||||
],
|
||||
["memory_storage", "redis_storage", "mongo_storage", "pymongo_storage"],
|
||||
indirect=True,
|
||||
)
|
||||
class TestStorages:
|
||||
async def test_set_state(self, storage: BaseStorage, storage_key: StorageKey):
|
||||
|
|
|
|||
|
|
@ -185,8 +185,8 @@ class TestSimpleRequestHandler:
|
|||
handler_event.clear()
|
||||
resp = await self.make_reqest(client=client)
|
||||
assert resp.status == 200
|
||||
await asyncio.wait_for(handler_event.wait(), timeout=1)
|
||||
await asyncio.wait_for(method_called_event.wait(), timeout=1)
|
||||
await asyncio.wait_for(handler_event.wait(), timeout=3)
|
||||
await asyncio.wait_for(method_called_event.wait(), timeout=3)
|
||||
# Python 3.12 had some changes to asyncio which make it quite a bit faster. But
|
||||
# probably because of that the assert_awaited call is consistently scheduled before the
|
||||
# silent_call_request call - failing the test. So we wait for the method to be called
|
||||
Loading…
Add table
Add a link
Reference in a new issue