MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __init__

Method __init__

tools/python-3.11.9-amd64/Lib/poplib.py:434–452  ·  view source on GitHub ↗
(self, host, port=POP3_SSL_PORT, keyfile=None, certfile=None,
                     timeout=socket._GLOBAL_DEFAULT_TIMEOUT, context=None)

Source from the content-addressed store, hash-verified

432 """
433
434 def __init__(self, host, port=POP3_SSL_PORT, keyfile=None, certfile=None,
435 timeout=socket._GLOBAL_DEFAULT_TIMEOUT, context=None):
436 if context is not None and keyfile is not None:
437 raise ValueError("context and keyfile arguments are mutually "
438 "exclusive")
439 if context is not None and certfile is not None:
440 raise ValueError("context and certfile arguments are mutually "
441 "exclusive")
442 if keyfile is not None or certfile is not None:
443 import warnings
444 warnings.warn("keyfile and certfile are deprecated, use a "
445 "custom context instead", DeprecationWarning, 2)
446 self.keyfile = keyfile
447 self.certfile = certfile
448 if context is None:
449 context = ssl._create_stdlib_context(certfile=certfile,
450 keyfile=keyfile)
451 self.context = context
452 POP3.__init__(self, host, port, timeout)
453
454 def _create_socket(self, timeout):
455 sock = POP3._create_socket(self, timeout)

Callers

nothing calls this directly

Calls 2

warnMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected