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:
@@ -1,4 +1,4 @@
|
||||
__version__ = "2.4.4"
|
||||
__version__ = "2.4.6"
|
||||
|
||||
from .impl import start_connection
|
||||
from .types import AddrInfoType
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user