1 # Stubs for poplib (Python 2 and 3)
\r
7 Any, BinaryIO, Dict, List, NoReturn, Optional, overload, Pattern, Text,
\r
11 _LongResp = Tuple[bytes, List[bytes], int]
\r
13 class error_proto(Exception): ...
\r
23 if sys.version_info >= (3, 0):
\r
32 def __init__(self, host: Text, port: int = ..., timeout: float = ...) -> None: ...
\r
33 def getwelcome(self) -> bytes: ...
\r
34 def set_debuglevel(self, level: int) -> None: ...
\r
35 def user(self, user: Text) -> bytes: ...
\r
36 def pass_(self, pswd: Text) -> bytes: ...
\r
37 def stat(self) -> Tuple[int, int]: ...
\r
38 def list(self, which: Optional[Any] = ...) -> _LongResp: ...
\r
39 def retr(self, which: Any) -> _LongResp: ...
\r
40 def dele(self, which: Any) -> bytes: ...
\r
41 def noop(self) -> bytes: ...
\r
42 def rset(self) -> bytes: ...
\r
43 def quit(self) -> bytes: ...
\r
44 def close(self) -> None: ...
\r
45 def rpop(self, user: Text) -> bytes: ...
\r
47 timestamp: Pattern[Text]
\r
49 if sys.version_info < (3, 0):
\r
50 def apop(self, user: Text, secret: Text) -> bytes: ...
\r
52 def apop(self, user: Text, password: Text) -> bytes: ...
\r
53 def top(self, which: Any, howmuch: int) -> _LongResp: ...
\r
56 def uidl(self) -> _LongResp: ...
\r
58 def uidl(self, which: Any) -> bytes: ...
\r
60 if sys.version_info >= (3, 5):
\r
61 def utf8(self) -> bytes: ...
\r
62 if sys.version_info >= (3, 4):
\r
63 def capa(self) -> Dict[Text, List[Text]]: ...
\r
64 def stls(self, context: Optional[ssl.SSLContext] = ...) -> bytes: ...
\r
67 class POP3_SSL(POP3):
\r
68 if sys.version_info >= (3, 0):
\r
69 def __init__(self, host: Text, port: int = ..., keyfile: Optional[Text] = ..., certfile: Optional[Text] = ...,
\r
70 timeout: float = ..., context: Optional[ssl.SSLContext] = ...) -> None: ...
\r
72 def __init__(self, host: Text, port: int = ..., keyfile: Optional[Text] = ..., certfile: Optional[Text] = ...,
\r
73 timeout: float = ...) -> None: ...
\r
75 if sys.version_info >= (3, 4):
\r
76 # "context" is actually the last argument, but that breaks LSP and it doesn't really matter because all the arguments are ignored
\r
77 def stls(self, context: Any = ..., keyfile: Any = ..., certfile: Any = ...) -> bytes: ...
\r