diff options
author | R David Murray <rdmurray@bitdance.com> | 2015-05-10 23:17:23 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2015-05-10 23:17:23 (GMT) |
commit | a6429db4b837dc49eb1bee42617798aebd7b43d4 (patch) | |
tree | 6e75df492ae0e1f8affac3cf463f0a6023ec7b0f /Doc/library/imaplib.rst | |
parent | 18c30a29f86dc41f96a572b6ec3f7bd6824f6e6a (diff) | |
download | cpython-a6429db4b837dc49eb1bee42617798aebd7b43d4.zip cpython-a6429db4b837dc49eb1bee42617798aebd7b43d4.tar.gz cpython-a6429db4b837dc49eb1bee42617798aebd7b43d4.tar.bz2 |
#21800: Add RFC 6855 support to imaplib.
Original patch by Milan Oberkirch, updated by myself and
Maciej Szulik.
Diffstat (limited to 'Doc/library/imaplib.rst')
-rw-r--r-- | Doc/library/imaplib.rst | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/Doc/library/imaplib.rst b/Doc/library/imaplib.rst index f263bab..15b0932 100644 --- a/Doc/library/imaplib.rst +++ b/Doc/library/imaplib.rst @@ -77,7 +77,8 @@ Three exceptions are defined as attributes of the :class:`IMAP4` class: There's also a subclass for secure connections: -.. class:: IMAP4_SSL(host='', port=IMAP4_SSL_PORT, keyfile=None, certfile=None, ssl_context=None) +.. class:: IMAP4_SSL(host='', port=IMAP4_SSL_PORT, keyfile=None, \ + certfile=None, ssl_context=None) This is a subclass derived from :class:`IMAP4` that connects over an SSL encrypted socket (to use this class you need a socket module that was compiled @@ -211,6 +212,10 @@ An :class:`IMAP4` instance has the following methods: that will be base64 encoded and sent to the server. It should return ``None`` if the client abort response ``*`` should be sent instead. + .. versionchanged:: 3.5 + string usernames and passwords are now encoded to ``utf-8`` instead of + being limited to ASCII. + .. method:: IMAP4.check() @@ -243,6 +248,16 @@ An :class:`IMAP4` instance has the following methods: Delete the ACLs (remove any rights) set for who on mailbox. +.. method:: IMAP4.enable(capability) + + Enable *capability* (see :rfc:`5161`). Most capabilities do not need to be + enabled. Currently only the ``UTF8=ACCEPT`` capability is supported + (see :RFC:`6855`). + + .. versionadded:: 3.5 + The :meth:`enable` method itself, and :RFC:`6855` support. + + .. method:: IMAP4.expunge() Permanently remove deleted items from selected mailbox. Generates an ``EXPUNGE`` @@ -380,7 +395,9 @@ An :class:`IMAP4` instance has the following methods: Search mailbox for matching messages. *charset* may be ``None``, in which case no ``CHARSET`` will be specified in the request to the server. The IMAP protocol requires that at least one criterion be specified; an exception will be - raised when the server returns an error. + raised when the server returns an error. *charset* must be ``None`` if + the ``UTF8=ACCEPT`` capability was enabled using the :meth:`enable` + command. Example:: @@ -542,6 +559,15 @@ The following attributes are defined on instances of :class:`IMAP4`: the module variable ``Debug``. Values greater than three trace each command. +.. attribute:: IMAP4.utf8_enabled + + Boolean value that is normally ``False``, but is set to ``True`` if an + :meth:`enable` command is successfully issued for the ``UTF8=ACCEPT`` + capability. + + .. versionadded:: 3.5 + + .. _imap4-example: IMAP4 Example |