mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Handle expected warnings & raise unexpected warnings (#1315)
* chore: replace fixture loop with event_loop
* chore: mark expected warnings
* chore: raise unexpected warnings
* chore: rm unused record
* fix: rm parenthesized context manager
* chore: warnings shall not pass
* chore: replace fixture loop with event_loop
* chore: mark expected warnings
* chore: raise unexpected warnings
* chore: rm unused record
* fix: rm parenthesized context manager
* chore: warnings shall not pass
* Revert "chore: raise unexpected warnings"
This reverts commit 4c91df243d.
* chore: warnings shall not pass v2
* fix: graceful aiohttp session close
* chore: minor typo
* chore: mark expected warnings
* fix: temporary mute ResourceWarning
#1320
* fix: close pool with redis
* chore: code reformat and lint
* chore: simplify tests with fixture
* chore: make aresponses clear
* chore: divide asserts with blank line
* chore: rm duplicated assertions
* chore: rm unnecessary extra
* chore: bump test dependencies
* chore: bump test dependencies (fix)
This commit is contained in:
parent
890a57cd15
commit
eacea996d4
12 changed files with 198 additions and 158 deletions
|
|
@ -139,6 +139,10 @@ class AiohttpSession(BaseSession):
|
|||
if self._session is not None and not self._session.closed:
|
||||
await self._session.close()
|
||||
|
||||
# Wait 250 ms for the underlying SSL connections to close
|
||||
# https://docs.aiohttp.org/en/stable/client_advanced.html#graceful-shutdown
|
||||
await asyncio.sleep(0.25)
|
||||
|
||||
def build_form_data(self, bot: Bot, method: TelegramMethod[TelegramType]) -> FormData:
|
||||
form = FormData(quote_fields=False)
|
||||
files: Dict[str, InputFile] = {}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class RedisStorage(BaseStorage):
|
|||
return RedisEventIsolation(redis=self.redis, key_builder=self.key_builder, **kwargs)
|
||||
|
||||
async def close(self) -> None:
|
||||
await self.redis.close()
|
||||
await self.redis.close(close_connection_pool=True)
|
||||
|
||||
async def set_state(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue