1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Проверка 09.02.2025

This commit is contained in:
MoonTestUse1
2025-02-09 01:11:49 +06:00
parent ce52f8a23a
commit 0aa3ef8fc2
5827 changed files with 14316 additions and 1906434 deletions

View File

@@ -1,4 +1,4 @@
__version__ = "2.4.4"
__version__ = "2.4.6"
from .impl import start_connection
from .types import AddrInfoType

View File

@@ -156,9 +156,9 @@ async def staggered_race(
# so we have no winner and all coroutines failed.
break
while tasks:
while tasks or start_next:
done = await _wait_one(
[*tasks, start_next] if start_next else tasks, loop
(*tasks, start_next) if start_next else tasks, loop
)
if done is start_next:
# The current task has failed or the timer has expired

View File

@@ -5,22 +5,11 @@ import collections
import functools
import itertools
import socket
import sys
from typing import List, Optional, Sequence, Union
from . import _staggered
from .types import AddrInfoType
if sys.version_info < (3, 8, 2): # noqa: UP036
# asyncio.staggered is broken in Python 3.8.0 and 3.8.1
# so it must be patched:
# https://github.com/aio-libs/aiohttp/issues/8556
# https://bugs.python.org/issue39129
# https://github.com/python/cpython/pull/17693
import asyncio.futures
asyncio.futures.TimeoutError = asyncio.TimeoutError # type: ignore[attr-defined]
async def start_connection(
addr_infos: Sequence[AddrInfoType],
@@ -162,7 +151,7 @@ async def _connect_sock(
msg = (
f"error while attempting to bind on "
f"address {laddr!r}: "
f"{exc.strerror.lower()}"
f"{(exc.strerror or '').lower()}"
)
exc = OSError(exc.errno, msg)
my_exceptions.append(exc)