MCPcopy Index your code
hub / github.com/python/cpython / _getaddrinfo_debug

Method _getaddrinfo_debug

Lib/asyncio/base_events.py:910–932  ·  view source on GitHub ↗
(self, host, port, family, type, proto, flags)

Source from the content-addressed store, hash-verified

908 self._default_executor = executor
909
910 def _getaddrinfo_debug(self, host, port, family, type, proto, flags):
911 msg = [f"{host}:{port!r}"]
912 if family:
913 msg.append(f'family={family!r}')
914 if type:
915 msg.append(f'type={type!r}')
916 if proto:
917 msg.append(f'proto={proto!r}')
918 if flags:
919 msg.append(f'flags={flags!r}')
920 msg = ', '.join(msg)
921 logger.debug('Get address info %s', msg)
922
923 t0 = self.time()
924 addrinfo = socket.getaddrinfo(host, port, family, type, proto, flags)
925 dt = self.time() - t0
926
927 msg = f'Getting address info {msg} took {dt * 1e3:.3f}ms: {addrinfo!r}'
928 if dt >= self.slow_callback_duration:
929 logger.info(msg)
930 else:
931 logger.debug(msg)
932 return addrinfo
933
934 async def getaddrinfo(self, host, port, *,
935 family=0, type=0, proto=0, flags=0):

Callers

nothing calls this directly

Calls 6

timeMethod · 0.95
appendMethod · 0.45
joinMethod · 0.45
debugMethod · 0.45
getaddrinfoMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected