about summary refs log tree commit diff
path: root/.venv/lib/python3.12/site-packages/aiohappyeyeballs/types.py
blob: e8c75074e7ab397af7ee1d1eb57cf04957a7a619 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Types for aiohappyeyeballs."""

import socket

# PY3.9: Import Callable from typing until we drop Python 3.9 support
# https://github.com/python/cpython/issues/87131
from typing import Callable, Tuple, Union

AddrInfoType = Tuple[
    Union[int, socket.AddressFamily],
    Union[int, socket.SocketKind],
    int,
    str,
    Tuple,  # type: ignore[type-arg]
]

SocketFactoryType = Callable[[AddrInfoType], socket.socket]