]> khamidou — GitHub mirrors - imapclient.git/commitdiff
Use Sphinx :rfc: role where appropriate
authorMenno Smits <menno@freshfoo.com>
Wed, 29 May 2013 20:46:09 +0000 (21:46 +0100)
committerMenno Smits <menno@freshfoo.com>
Wed, 29 May 2013 20:46:09 +0000 (21:46 +0100)
This also avoids a warning when the docs are built about multiple
references to the same RFC.

doc/src/index.rst
imapclient/imapclient.py

index 9f70bdc4a7fce546289c6784861506cbdf7bf19d..e71a1675c669b3e90722c6a8418e76f81359e6fc 100644 (file)
@@ -25,11 +25,10 @@ types. Exceptions are raised when problems occur (no error checking of
 return values is required).
 
 IMAPClient is straight forward it use, but it can be useful to have at
-least a general understanding of the IMAP protocol. `RFC 3501
-<http://www.faqs.org/rfcs/rfc3501.html>`_ explains IMAP in
-detail. Other RFCs also apply to various extensions to the base
-protocol. These are referred to in the documentation below where
-relevant.
+least a general understanding of the IMAP protocol. :rfc:`3501`
+explains IMAP in detail. Other RFCs also apply to various extensions
+to the base protocol. These are referred to in the documentation below
+where relevant.
 
 A Simple Example
 ----------------
@@ -120,10 +119,9 @@ Folder Name Encoding
 ~~~~~~~~~~~~~~~~~~~~
 Any method that takes a folder name will accept a standard string or a
 unicode string. Unicode strings will be transparently encoded using
-modified UTF-7 as specified by `RFC 3501 section 5.1.3
-<http://tools.ietf.org/html/rfc3501#section-5.1.3>`_.  This allows for
-arbitrary unicode characters (eg. non-English characters) to be used
-in folder names.
+modified UTF-7 as specified by :rfc:`3501#section-5.1.3`.  This allows
+for arbitrary unicode characters (eg. non-English characters) to be
+used in folder names.
 
 All folder names returned by IMAPClient are always returned as unicode
 strings.
index 94dc614c4cd4746ea5db3188c8e25553c5c0fb9a..9e2c12f9692e5ebb7e9d77c79ae9bef2ed4328ac 100644 (file)
@@ -222,7 +222,7 @@ class IMAPClient(object):
         positionally or using attributes named *personal*, *other* and
         *shared*.
 
-        See `RFC 2342 <http://tools.ietf.org/html/rfc2342>`_ for more details.
+        See :rfc:`2342` for more details.
         """
         data = self._command_and_check('namespace')
         return Namespace(*parse_response(data))
@@ -406,8 +406,7 @@ class IMAPClient(object):
             Any other commmands issued while the server is in IDLE
             mode will fail.
 
-        See `RFC 2177 <http://tools.ietf.org/html/rfc2177>`_ for more
-        information about the IDLE extension.
+        See :rfc:`2177` for more information about the IDLE extension.
         """
         self._idle_tag = self._imap._command('IDLE')
         resp = from_bytes(self._imap._get_response())
@@ -554,8 +553,7 @@ class IMAPClient(object):
         *charset* specifies the character set of the strings in the
         criteria. It defaults to US-ASCII.
 
-        See `RFC 3501 section 6.4.4 <http://tools.ietf.org/html/rfc3501#section-6.4.4>`_
-        for more details.
+        See :rfc:`3501#section-6.4.4` for more details.
         """
         criteria = normalise_search_criteria(criteria)
 
@@ -582,7 +580,7 @@ class IMAPClient(object):
 
         Each thread is a list of messages ids.
 
-        See `RFC 5256 <https://tools.ietf.org/html/rfc5256>`_ for more details.
+        See :rfc:`5256` for more details.
         """
         if not self.has_capability('THREAD=' + algorithm):
             raise ValueError('server does not support %s threading algorithm'
@@ -610,7 +608,8 @@ class IMAPClient(object):
             SUBJECT
 
         The *criteria* argument is as per search().
-        See `RFC 5256 <http://tools.ietf.org/html/rfc5256>`_ for full details.
+
+        See :rfc:`5256` for full details.
 
         Note that SORT is an extension to the IMAP4 standard so it may
         not be supported by all IMAP servers.
@@ -738,7 +737,7 @@ class IMAPClient(object):
         'RFC822']``.
 
         *modifiers* are required for some extensions to the IMAP
-        protocol (eg. RFC 4551). These should be a sequnce of strings
+        protocol (eg. :rfc:`4551`). These should be a sequnce of strings
         if specified, for example ``['CHANGEDSINCE 123']``.
 
         A dictionary is returned, indexed by message number. Each item
@@ -839,11 +838,8 @@ class IMAPClient(object):
         sequence numbers 2 and 1 where deleted, leaving no recent
         messages in the folder.
 
-        See `RFC 3501 section 6.4.3
-        <http://tools.ietf.org/html/rfc3501#section-6.4.3>`_ and
-        `RFC 3501 section 7.4.1
-        <http://tools.ietf.org/html/rfc3501#section-7.4.1>`_ for more
-        details.
+        See :rfc:`3501#section-6.4.3` section 6.4.3 and
+        :rfc:`3501#section-7.4.1` section 7.4.1 for more details.
         """
         tag = self._imap._command('EXPUNGE')
         return self._consume_until_tagged_response(tag, 'EXPUNGE')