]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Doc updates.
authorBen Darnell <ben@bendarnell.com>
Tue, 31 Dec 2013 22:50:12 +0000 (17:50 -0500)
committerBen Darnell <ben@bendarnell.com>
Tue, 31 Dec 2013 22:50:12 +0000 (17:50 -0500)
* Version-added tags
* Add some missing methods
* Ignore asyncio module for coverage reports
* Work around a sphinx 1.2 regression

docs/asyncio.rst
docs/conf.py
docs/web.rst
tornado/auth.py
tornado/escape.py
tornado/log.py
tornado/web.py

index 98599a7db651f9abf97c3b6e7fd397090db76360..d096506614876c0f0c8bf9fcb16cb848c5cbef25 100644 (file)
@@ -3,6 +3,8 @@
 
 .. module:: tornado.platform.asyncio
 
+.. versionadded:: 3.2
+
 This module integrates Tornado with the ``asyncio`` module introduced
 in Python 3.4 (and available `as a separate download
 <https://pypi.python.org/pypi/asyncio>`_ for Python 3.3).  This makes
index a091fa7ec2ae5f2aef4ec89394a1e5fa3f4b0c83..46ca60e16534c6e822c0d0c095f856d853806e8d 100644 (file)
@@ -25,8 +25,14 @@ default_role = 'py:obj'
 autodoc_member_order = "bysource"
 autoclass_content = "both"
 
+# Without this line sphinx includes a copy of object.__init__'s docstring
+# on any class that doesn't define __init__.
+# https://bitbucket.org/birkenfeld/sphinx/issue/1337/autoclass_content-both-uses-object__init__
+autodoc_docstring_signature = False
+
 coverage_skip_undoc_in_source = True
 coverage_ignore_modules = [
+    "tornado.platform.asyncio",
     "tornado.platform.twisted",
     ]
 # I wish this could go in a per-module file...
index b62f2b57e8d0193c13d8764b7f3f600b174b93a0..104f686ebd49c2b144682aa2d3eabb85b821275a 100644 (file)
@@ -92,6 +92,7 @@
       The `Application` object serving this request
 
    .. automethod:: RequestHandler.async_callback
+   .. automethod:: RequestHandler.check_etag_header
    .. automethod:: RequestHandler.check_xsrf_cookie
    .. automethod:: RequestHandler.compute_etag
    .. automethod:: RequestHandler.create_template_loader
    .. automethod:: RequestHandler.on_connection_close
    .. automethod:: RequestHandler.require_setting
    .. automethod:: RequestHandler.reverse_url
+   .. automethod:: RequestHandler.set_etag_header
    .. autoattribute:: RequestHandler.settings
    .. automethod:: RequestHandler.static_url
    .. automethod:: RequestHandler.xsrf_form_html
index f2080f1e9730e80a625db3beb9c907859950c735..0881b05189c56160f7247bb865f8e7d9f9474184 100644 (file)
@@ -949,7 +949,10 @@ class GoogleMixin(OpenIdMixin, OAuthMixin):
 
 
 class GoogleOAuth2Mixin(OAuth2Mixin):
-    """Google authentication using OAuth2."""
+    """Google authentication using OAuth2.
+
+    .. versionadded:: 3.2
+    """
     _OAUTH_AUTHORIZE_URL = "https://accounts.google.com/o/oauth2/auth"
     _OAUTH_ACCESS_TOKEN_URL = "https://accounts.google.com/o/oauth2/token"
     _OAUTH_NO_CALLBACKS = False
index 302e556f1d0c7f33ce87682dd5234de08bdc850a..95c0f24e8615693e8d045388852a1e34921e10f1 100644 (file)
@@ -55,7 +55,16 @@ _XHTML_ESCAPE_DICT = {'&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;',
 
 
 def xhtml_escape(value):
-    """Escapes a string so it is valid within HTML or XML."""
+    """Escapes a string so it is valid within HTML or XML.
+
+    Escapes the characters ``<``, ``>``, ``"``, ``'``, and ``&``.
+    When used in attribute values the escaped strings must be enclosed
+    in quotes.
+
+    .. versionchanged:: 3.2
+
+       Added the single quote to the list of escaped characters.
+    """
     return _XHTML_ESCAPE_RE.sub(lambda match: _XHTML_ESCAPE_DICT[match.group(0)],
                                 to_basestring(value))
 
index bc6898c82bba1390693898f7478dc95a8ff2e542..48532b1892218b03a90825dd7b1b2cd1c8aa88c8 100644 (file)
@@ -84,6 +84,10 @@ class LogFormatter(logging.Formatter):
           message text.
         :arg string datefmt: Datetime format.
           Used for formatting ``(asctime)`` placeholder in ``prefix_fmt``.
+
+        .. versionchanged:: 3.2
+
+           Added ``prefix_fmt`` and ``datefmt`` arguments.
         """
         self.__prefix_fmt = prefix_fmt if prefix_fmt is not None else self.DEFAULT_PREFIX_FORMAT
         datefmt = datefmt if datefmt is not None else self.DEFAULT_DATE_FORMAT
index 65a76cd47468e02214d88bf2065d5c2a71decb18..7d29c38344a1c447d4edd09379e40da7cc9c061d 100644 (file)
@@ -516,6 +516,10 @@ class RequestHandler(object):
 
         See `clear_cookie` for more information on the path and domain
         parameters.
+
+        .. versionchanged:: 3.2
+
+           Added the ``path`` and ``domain`` parameters.
         """
         for name in self.request.cookies:
             self.clear_cookie(name, path=path, domain=domain)