mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
#21804: Add RFC 6856 (UTF8) support to poplib.
Patch by Milan Oberkirch.
This commit is contained in:
parent
8eb1f077c2
commit
b8cd3e4e30
5 changed files with 41 additions and 0 deletions
|
@ -71,6 +71,7 @@ class POP3:
|
|||
UIDL [msg] uidl(msg = None)
|
||||
CAPA capa()
|
||||
STLS stls()
|
||||
UTF8 utf8()
|
||||
|
||||
Raises one exception: 'error_proto'.
|
||||
|
||||
|
@ -348,6 +349,12 @@ class POP3:
|
|||
return self._longcmd('UIDL')
|
||||
|
||||
|
||||
def utf8(self):
|
||||
"""Try to enter UTF-8 mode (see RFC 6856). Returns server response.
|
||||
"""
|
||||
return self._shortcmd('UTF8')
|
||||
|
||||
|
||||
def capa(self):
|
||||
"""Return server capabilities (RFC 2449) as a dictionary
|
||||
>>> c=poplib.POP3('localhost')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue