MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / _getaddrinfo

Function _getaddrinfo

pymongo/asynchronous/helpers.py:119–134  ·  view source on GitHub ↗
(
    host: Any, port: Any, **kwargs: Any
)

Source from the content-addressed store, hash-verified

117
118
119async def _getaddrinfo(
120 host: Any, port: Any, **kwargs: Any
121) -> list[
122 tuple[
123 socket.AddressFamily,
124 socket.SocketKind,
125 int,
126 str,
127 tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes],
128 ]
129]:
130 if not _IS_SYNC:
131 loop = asyncio.get_running_loop()
132 return await loop.getaddrinfo(host, port, **kwargs) # type: ignore[return-value]
133 else:
134 return socket.getaddrinfo(host, port, **kwargs)
135
136
137if sys.version_info >= (3, 10):

Callers 1

_canonicalize_hostnameFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected