mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +00:00
Bump Telegram Bot API version
Change request timeout mechanism Bump package version
This commit is contained in:
parent
b78f1cdb17
commit
7844a663a9
58 changed files with 526 additions and 369 deletions
|
|
@ -1,12 +1,13 @@
|
|||
import datetime
|
||||
import json
|
||||
from typing import AsyncContextManager, AsyncGenerator
|
||||
from typing import AsyncContextManager, AsyncGenerator, Optional
|
||||
|
||||
import pytest
|
||||
|
||||
from aiogram.api.client.session.base import BaseSession, T
|
||||
from aiogram.api.client.telegram import PRODUCTION, TelegramAPIServer
|
||||
from aiogram.api.methods import GetMe, Response, TelegramMethod
|
||||
from aiogram.api.types import UNSET
|
||||
|
||||
try:
|
||||
from asynctest import CoroutineMock, patch
|
||||
|
|
@ -18,7 +19,7 @@ class CustomSession(BaseSession):
|
|||
async def close(self):
|
||||
pass
|
||||
|
||||
async def make_request(self, token: str, method: TelegramMethod[T]) -> None: # type: ignore
|
||||
async def make_request(self, token: str, method: TelegramMethod[T], timeout: Optional[int] = UNSET) -> None: # type: ignore
|
||||
assert isinstance(token, str)
|
||||
assert isinstance(method, TelegramMethod)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue