diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-05-31 04:39:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-31 04:39:00 (GMT) |
commit | 0a36ac1a09587735237c5978ebd046313922869c (patch) | |
tree | 95a9ba44ac327cddbec5eb03dfb03cd1bc8f6551 /Doc/howto | |
parent | a5c42284e69fb309bdd17ee8c1c120d1be383012 (diff) | |
download | cpython-0a36ac1a09587735237c5978ebd046313922869c.zip cpython-0a36ac1a09587735237c5978ebd046313922869c.tar.gz cpython-0a36ac1a09587735237c5978ebd046313922869c.tar.bz2 |
bpo-33641: Convert RFC references into links. (GH-7103)
85% of them are already links.
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/logging-cookbook.rst | 10 | ||||
-rw-r--r-- | Doc/howto/logging.rst | 2 | ||||
-rw-r--r-- | Doc/howto/urllib2.rst | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst index fdf7874..b1930a7 100644 --- a/Doc/howto/logging-cookbook.rst +++ b/Doc/howto/logging-cookbook.rst @@ -1652,11 +1652,11 @@ works:: Inserting a BOM into messages sent to a SysLogHandler ----------------------------------------------------- -`RFC 5424 <https://tools.ietf.org/html/rfc5424>`_ requires that a +:rfc:`5424` requires that a Unicode message be sent to a syslog daemon as a set of bytes which have the following structure: an optional pure-ASCII component, followed by a UTF-8 Byte -Order Mark (BOM), followed by Unicode encoded using UTF-8. (See the `relevant -section of the specification <https://tools.ietf.org/html/rfc5424#section-6>`_.) +Order Mark (BOM), followed by Unicode encoded using UTF-8. (See the +:rfc:`relevant section of the specification <5424#section-6>`.) In Python 3.1, code was added to :class:`~logging.handlers.SysLogHandler` to insert a BOM into the message, but @@ -1666,7 +1666,7 @@ appear before it. As this behaviour is broken, the incorrect BOM insertion code is being removed from Python 3.2.4 and later. However, it is not being replaced, and if you -want to produce RFC 5424-compliant messages which include a BOM, an optional +want to produce :rfc:`5424`-compliant messages which include a BOM, an optional pure-ASCII sequence before it and arbitrary Unicode after it, encoded using UTF-8, then you need to do the following: @@ -1689,7 +1689,7 @@ UTF-8, then you need to do the following: The formatted message *will* be encoded using UTF-8 encoding by ``SysLogHandler``. If you follow the above rules, you should be able to produce -RFC 5424-compliant messages. If you don't, logging may not complain, but your +:rfc:`5424`-compliant messages. If you don't, logging may not complain, but your messages will not be RFC 5424-compliant, and your syslog daemon may complain. diff --git a/Doc/howto/logging.rst b/Doc/howto/logging.rst index e9e5580..47b5c68 100644 --- a/Doc/howto/logging.rst +++ b/Doc/howto/logging.rst @@ -297,7 +297,7 @@ which should print something like this: 2010-12-12 11:41:42,612 is when this event was logged. The default format for date/time display (shown above) is like ISO8601 or -RFC 3339. If you need more control over the formatting of the date/time, provide +:rfc:`3339`. If you need more control over the formatting of the date/time, provide a *datefmt* argument to ``basicConfig``, as in this example:: import logging diff --git a/Doc/howto/urllib2.rst b/Doc/howto/urllib2.rst index ef1791c..046a88a 100644 --- a/Doc/howto/urllib2.rst +++ b/Doc/howto/urllib2.rst @@ -239,7 +239,7 @@ a different URL, urllib will handle that for you). For those it can't handle, urlopen will raise an :exc:`HTTPError`. Typical errors include '404' (page not found), '403' (request forbidden), and '401' (authentication required). -See section 10 of RFC 2616 for a reference on all the HTTP error codes. +See section 10 of :rfc:`2616` for a reference on all the HTTP error codes. The :exc:`HTTPError` instance raised will have an integer 'code' attribute, which corresponds to the error sent by the server. @@ -252,7 +252,7 @@ codes in the 100--299 range indicate success, you will usually only see error codes in the 400--599 range. :attr:`http.server.BaseHTTPRequestHandler.responses` is a useful dictionary of -response codes in that shows all the response codes used by RFC 2616. The +response codes in that shows all the response codes used by :rfc:`2616`. The dictionary is reproduced here for convenience :: # Table mapping response codes to messages; entries have the |