equal
deleted
inserted
replaced
15 import io |
15 import io |
16 import os |
16 import os |
17 import smtplib |
17 import smtplib |
18 import socket |
18 import socket |
19 import time |
19 import time |
|
20 |
|
21 from typing import ( |
|
22 Any, |
|
23 List, |
|
24 Tuple, |
|
25 Union, |
|
26 ) |
20 |
27 |
21 from .i18n import _ |
28 from .i18n import _ |
22 from .pycompat import ( |
29 from .pycompat import ( |
23 open, |
30 open, |
24 ) |
31 ) |
33 procutil, |
40 procutil, |
34 stringutil, |
41 stringutil, |
35 urlutil, |
42 urlutil, |
36 ) |
43 ) |
37 |
44 |
38 if pycompat.TYPE_CHECKING: |
45 |
39 from typing import Any, List, Tuple, Union |
46 # keep pyflakes happy |
40 |
47 assert [ |
41 # keep pyflakes happy |
48 Any, |
42 assert all((Any, List, Tuple, Union)) |
49 List, |
|
50 Tuple, |
|
51 Union, |
|
52 ] |
43 |
53 |
44 |
54 |
45 class STARTTLS(smtplib.SMTP): |
55 class STARTTLS(smtplib.SMTP): |
46 """Derived class to verify the peer certificate for STARTTLS. |
56 """Derived class to verify the peer certificate for STARTTLS. |
47 |
57 |