]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Fix most of the rest of the dangling references.
authorBen Darnell <ben@bendarnell.com>
Sat, 16 Mar 2013 05:21:53 +0000 (01:21 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 16 Mar 2013 05:21:53 +0000 (01:21 -0400)
17 files changed:
docs/tcpserver.rst
docs/twisted.rst
docs/web.rst
tornado/httpclient.py
tornado/httpserver.py
tornado/httputil.py
tornado/ioloop.py
tornado/iostream.py
tornado/netutil.py
tornado/options.py
tornado/process.py
tornado/stack_context.py
tornado/tcpserver.py
tornado/template.py
tornado/testing.py
tornado/web.py
tornado/websocket.py

index 3456cc903a3729d5df8b2b366dc362ad632ba6b2..5500ab4c5cee71fe0d1322dec8f76c35b32310d7 100644 (file)
@@ -1,5 +1,5 @@
-``tornado.tcpserver`` --- Basic `IOStream`-based TCP server
-===========================================================
+``tornado.tcpserver`` --- Basic `.IOStream`-based TCP server
+============================================================
 
 .. automodule:: tornado.tcpserver
     :members:
index 2e5222dfbbad0a3777dc4482cc0b2cf946ac7298..d7e2cd84e96a724ee099d8f540185658c842dd34 100644 (file)
@@ -10,32 +10,32 @@ depending on which library's underlying event loop you want to use.
 Twisted on Tornado
 ------------------
 
-`TornadoReactor` implements the Twisted reactor interface on top of
-the Tornado IOLoop.  To use it, simply call `install` at the beginning
+``TornadoReactor`` implements the Twisted reactor interface on top of
+the Tornado IOLoop.  To use it, simply call ``install`` at the beginning
 of the application::
 
     import tornado.platform.twisted
     tornado.platform.twisted.install()
     from twisted.internet import reactor
 
-When the app is ready to start, call `IOLoop.instance().start()`
-instead of `reactor.run()`.
+When the app is ready to start, call ``IOLoop.instance().start()``
+instead of ``reactor.run()``.
 
 It is also possible to create a non-global reactor by calling
-`tornado.platform.twisted.TornadoReactor(io_loop)`.  However, if
-the `IOLoop` and reactor are to be short-lived (such as those used in
+``tornado.platform.twisted.TornadoReactor(io_loop)``.  However, if
+the `.IOLoop` and reactor are to be short-lived (such as those used in
 unit tests), additional cleanup may be required.  Specifically, it is
 recommended to call::
 
     reactor.fireSystemEvent('shutdown')
     reactor.disconnectAll()
 
-before closing the `IOLoop`.
+before closing the `.IOLoop`.
 
 Tornado on Twisted
 ------------------
 
-`TwistedIOLoop` implements the Tornado IOLoop interface on top of the Twisted
+``TwistedIOLoop`` implements the Tornado IOLoop interface on top of the Twisted
 reactor.  Recommended usage::
 
     from tornado.platform.twisted import TwistedIOLoop
@@ -44,6 +44,6 @@ reactor.  Recommended usage::
     # Set up your tornado application as usual using `IOLoop.instance`
     reactor.run()
 
-`TwistedIOLoop` always uses the global Twisted reactor.
+``TwistedIOLoop`` always uses the global Twisted reactor.
 
 This module has been tested with Twisted versions 11.0.0 and newer.
index 4fba9869518d8aa621184434bf13f932036d7ccb..041152c23c7a4a9d78722041bfce0ebd8542b27b 100644 (file)
          Authentication and security settings:
 
          * ``cookie_secret``: Used by `RequestHandler.get_secure_cookie`
-           and `set_secure_cookie` to sign cookies.
+           and `.set_secure_cookie` to sign cookies.
          * ``login_url``: The `authenticated` decorator will redirect
            to this url if the user is not logged in.  Can be further
            customized by overriding `RequestHandler.get_login_url`
index b5a4debc9ba444f31f625cf6c1cee35ecdb3d3dc..a9fda709cce664e8a193efe72ad977db8c56ccb2 100644 (file)
@@ -1,30 +1,30 @@
 """Blocking and non-blocking HTTP client interfaces.
 
 This module defines a common interface shared by two implementations,
-`simple_httpclient` and `curl_httpclient`.  Applications may either
+``simple_httpclient`` and ``curl_httpclient``.  Applications may either
 instantiate their chosen implementation class directly or use the
 `AsyncHTTPClient` class from this module, which selects an implementation
 that can be overridden with the `AsyncHTTPClient.configure` method.
 
-The default implementation is `simple_httpclient`, and this is expected
+The default implementation is ``simple_httpclient``, and this is expected
 to be suitable for most users' needs.  However, some applications may wish
-to switch to `curl_httpclient` for reasons such as the following:
+to switch to ``curl_httpclient`` for reasons such as the following:
 
-* `curl_httpclient` has some features not found in `simple_httpclient`,
+* ``curl_httpclient`` has some features not found in ``simple_httpclient``,
   including support for HTTP proxies and the ability to use a specified
   network interface.
 
-* `curl_httpclient` is more likely to be compatible with sites that are
+* ``curl_httpclient`` is more likely to be compatible with sites that are
   not-quite-compliant with the HTTP spec, or sites that use little-exercised
   features of HTTP.
 
-* `simple_httpclient` only supports SSL on Python 2.6 and above.
+* ``simple_httpclient`` only supports SSL on Python 2.6 and above.
 
-* `curl_httpclient` is faster
+* ``curl_httpclient`` is faster
 
-* `curl_httpclient` was the default prior to Tornado 2.0.
+* ``curl_httpclient`` was the default prior to Tornado 2.0.
 
-Note that if you are using `curl_httpclient`, it is highly recommended that
+Note that if you are using ``curl_httpclient``, it is highly recommended that
 you use a recent version of ``libcurl`` and ``pycurl``.  Currently the minimum
 supported version is 7.18.2, and the recommended version is 7.21.1 or newer.
 """
@@ -255,7 +255,7 @@ class HTTPRequest(object):
                  client_key=None, client_cert=None):
         r"""Creates an `HTTPRequest`.
 
-        All parameters except `url` are optional.
+        All parameters except ``url`` are optional.
 
         :arg string url: URL to fetch
         :arg string method: HTTP method, e.g. "GET" or "POST"
@@ -269,43 +269,43 @@ class HTTPRequest(object):
            header
         :arg bool follow_redirects: Should redirects be followed automatically
            or return the 3xx response?
-        :arg int max_redirects: Limit for `follow_redirects`
+        :arg int max_redirects: Limit for ``follow_redirects``
         :arg string user_agent: String to send as ``User-Agent`` header
         :arg bool use_gzip: Request gzip encoding from the server
         :arg string network_interface: Network interface to use for request
-        :arg callable streaming_callback: If set, `streaming_callback` will
+        :arg callable streaming_callback: If set, ``streaming_callback`` will
            be run with each chunk of data as it is received, and
-           `~HTTPResponse.body` and `~HTTPResponse.buffer` will be empty in
+           ``HTTPResponse.body`` and ``HTTPResponse.buffer`` will be empty in
            the final response.
-        :arg callable header_callback: If set, `header_callback` will
+        :arg callable header_callback: If set, ``header_callback`` will
            be run with each header line as it is received (including the
            first line, e.g. ``HTTP/1.0 200 OK\r\n``, and a final line
            containing only ``\r\n``.  All lines include the trailing newline
-           characters).  `~HTTPResponse.headers` will be empty in the final
+           characters).  ``HTTPResponse.headers`` will be empty in the final
            response.  This is most useful in conjunction with
-           `streaming_callback`, because it's the only way to get access to
+           ``streaming_callback``, because it's the only way to get access to
            header data while the request is in progress.
         :arg callable prepare_curl_callback: If set, will be called with
-           a `pycurl.Curl` object to allow the application to make additional
-           `setopt` calls.
+           a ``pycurl.Curl`` object to allow the application to make additional
+           ``setopt`` calls.
         :arg string proxy_host: HTTP proxy hostname.  To use proxies,
-           `proxy_host` and `proxy_port` must be set; `proxy_username` and
-           `proxy_pass` are optional.  Proxies are currently only support
-           with `curl_httpclient`.
+           ``proxy_host`` and ``proxy_port`` must be set; ``proxy_username`` and
+           ``proxy_pass`` are optional.  Proxies are currently only supported
+           with ``curl_httpclient``.
         :arg int proxy_port: HTTP proxy port
         :arg string proxy_username: HTTP proxy username
         :arg string proxy_password: HTTP proxy password
-        :arg bool allow_nonstandard_methods: Allow unknown values for `method`
+        :arg bool allow_nonstandard_methods: Allow unknown values for ``method``
            argument?
         :arg bool validate_cert: For HTTPS requests, validate the server's
            certificate?
         :arg string ca_certs: filename of CA certificates in PEM format,
-           or None to use defaults.  Note that in `curl_httpclient`, if
-           any request uses a custom `ca_certs` file, they all must (they
-           don't have to all use the same `ca_certs`, but it's not possible
+           or None to use defaults.  Note that in ``curl_httpclient``, if
+           any request uses a custom ``ca_certs`` file, they all must (they
+           don't have to all use the same ``ca_certs``, but it's not possible
            to mix requests with ca_certs and requests that use the defaults.
         :arg bool allow_ipv6: Use IPv6 when available?  Default is false in
-           `simple_httpclient` and true in `curl_httpclient`
+           ``simple_httpclient`` and true in ``curl_httpclient``
         :arg string client_key: Filename for client SSL key, if any
         :arg string client_cert: Filename for client SSL certificate, if any
         """
index c52adbf8dbc9d7472e2ba80124642932c44b4206..1ee4c98544044d1bd1f783e5cc40ea945ba51860 100644 (file)
@@ -124,9 +124,9 @@ class HTTPServer(TCPServer):
             server.start(0)  # Forks multiple sub-processes
             IOLoop.instance().start()
 
-       When using this interface, an `IOLoop` must *not* be passed
-       to the `HTTPServer` constructor.  `start` will always start
-       the server on the default singleton `IOLoop`.
+       When using this interface, an `.IOLoop` must *not* be passed
+       to the `HTTPServer` constructor.  `~.TCPServer.start` will always start
+       the server on the default singleton `.IOLoop`.
 
     3. `~tornado.tcpserver.TCPServer.add_sockets`: advanced multi-process::
 
@@ -136,12 +136,12 @@ class HTTPServer(TCPServer):
             server.add_sockets(sockets)
             IOLoop.instance().start()
 
-       The `add_sockets` interface is more complicated, but it can be
-       used with `tornado.process.fork_processes` to give you more
-       flexibility in when the fork happens.  `add_sockets` can
-       also be used in single-process servers if you want to create
-       your listening sockets in some way other than
-       `tornado.netutil.bind_sockets`.
+       The `~.TCPServer.add_sockets` interface is more complicated,
+       but it can be used with `tornado.process.fork_processes` to
+       give you more flexibility in when the fork happens.
+       `~.TCPServer.add_sockets` can also be used in single-process
+       servers if you want to create your listening sockets in some
+       way other than `tornado.netutil.bind_sockets`.
 
     """
     def __init__(self, request_callback, no_keep_alive=False, io_loop=None,
@@ -193,8 +193,10 @@ class HTTPConnection(object):
     def set_close_callback(self, callback):
         """Sets a callback that will be run when the connection is closed.
 
-        Use this instead of accessing `HTTPConnection.stream.set_close_callback`
-        directly (which was the recommended approach prior to Tornado 3.0).
+        Use this instead of accessing
+        `HTTPConnection.stream.set_close_callback
+        <.BaseIOStream.set_close_callback>` directly (which was the
+        recommended approach prior to Tornado 3.0).
         """
         self._close_callback = stack_context.wrap(callback)
         self.stream.set_close_callback(self._on_connection_close)
@@ -345,7 +347,7 @@ class HTTPRequest(object):
 
     .. attribute:: headers
 
-       `HTTPHeader` dictionary-like object for request headers.  Acts like
+       `.HTTPHeaders` dictionary-like object for request headers.  Acts like
        a case-insensitive dictionary with additional methods for repeated
        headers.
 
@@ -355,13 +357,13 @@ class HTTPRequest(object):
 
     .. attribute:: remote_ip
 
-       Client's IP address as a string.  If `HTTPServer.xheaders` is set,
+       Client's IP address as a string.  If ``HTTPServer.xheaders`` is set,
        will pass along the real IP address provided by a load balancer
        in the ``X-Real-Ip`` header
 
     .. attribute:: protocol
 
-       The protocol used, either "http" or "https".  If `HTTPServer.xheaders`
+       The protocol used, either "http" or "https".  If ``HTTPServer.xheaders``
        is set, will pass along the protocol used by a load balancer if
        reported via an ``X-Scheme`` header.
 
@@ -375,13 +377,13 @@ class HTTPRequest(object):
        maps arguments names to lists of values (to support multiple values
        for individual names). Names are of type `str`, while arguments
        are byte strings.  Note that this is different from
-       `RequestHandler.get_argument`, which returns argument values as
+       `.RequestHandler.get_argument`, which returns argument values as
        unicode strings.
 
     .. attribute:: files
 
        File uploads are available in the files property, which maps file
-       names to lists of :class:`HTTPFile`.
+       names to lists of `.HTTPFile`.
 
     .. attribute:: connection
 
index 9a614a4564fa148f81366a13e442649ed5163d19..3fd709b81ddab55a3f7bd14205ecbc18a9b43fe9 100644 (file)
@@ -297,8 +297,8 @@ def parse_multipart_form_data(boundary, data, arguments, files):
 def format_timestamp(ts):
     """Formats a timestamp in the format used by HTTP.
 
-    The argument may be a numeric timestamp as returned by `time.time()`,
-    a time tuple as returned by `time.gmtime()`, or a `datetime.datetime`
+    The argument may be a numeric timestamp as returned by `time.time`,
+    a time tuple as returned by `time.gmtime`, or a `datetime.datetime`
     object.
 
     >>> format_timestamp(1359312200)
index e63ac631c9e73b89c644ef8be9fc20f423279d74..1b3727c97f566434ebf1a90e7aa080eeefbf51f5 100644 (file)
@@ -308,16 +308,17 @@ class IOLoop(Configurable):
     def run_sync(self, func, timeout=None):
         """Starts the `IOLoop`, runs the given function, and stops the loop.
 
-        If the function returns a `Future`, the `IOLoop` will run until
-        the future is resolved.  If it raises an exception, the `IOLoop`
-        will stop and the exception will be re-raised to the caller.
+        If the function returns a `~concurrent.futures.Future`, the
+        `IOLoop` will run until the future is resolved.  If it raises
+        an exception, the `IOLoop` will stop and the exception will be
+        re-raised to the caller.
 
         The keyword-only argument ``timeout`` may be used to set
         a maximum duration for the function.  If the timeout expires,
         a `TimeoutError` is raised.
 
         This method is useful in conjunction with `tornado.gen.coroutine`
-        to allow asynchronous calls in a `main()` function::
+        to allow asynchronous calls in a ``main()`` function::
 
             @gen.coroutine
             def main():
index bcb0eb46ecec5c899d4b82303d3dd79876e1ace0..476a37874bbe05d0fd22224a7e1b2121383ff79d 100644 (file)
@@ -58,7 +58,7 @@ class BaseIOStream(object):
     All of the methods take callbacks (since writing and reading are
     non-blocking and asynchronous).
 
-    When a stream is closed due to an error, the IOStream's `error`
+    When a stream is closed due to an error, the IOStream's ``error``
     attribute contains the exception object.
 
     Subclasses must implement `fileno`, `close_fd`, `write_to_fd`,
@@ -213,7 +213,7 @@ class BaseIOStream(object):
         """Close this stream.
 
         If ``exc_info`` is true, set the ``error`` attribute to the current
-        exception from `sys.exc_info()` (or if ``exc_info`` is a tuple,
+        exception from `sys.exc_info` (or if ``exc_info`` is a tuple,
         use that instead of `sys.exc_info`).
         """
         if not self.closed():
index cbf0f8004180debb3b00e40ba16dfa873a93273a..fe2b38066322966549ca09efa9411995ec5bb814 100644 (file)
@@ -162,9 +162,9 @@ def is_valid_ip(ip):
 class Resolver(Configurable):
     """Configurable asynchronous DNS resolver interface.
 
-    By default, a blocking implementation is used (which simply
-    calls `socket.getaddrinfo`).  An alternative implementation
-    can be chosen with the `Resolver.configure` class method::
+    By default, a blocking implementation is used (which simply calls
+    `socket.getaddrinfo`).  An alternative implementation can be
+    chosen with the ``Resolver.configure`` class method::
 
         Resolver.configure('tornado.netutil.ThreadedResolver')
 
@@ -173,8 +173,8 @@ class Resolver(Configurable):
     * `tornado.netutil.BlockingResolver`
     * `tornado.netutil.ThreadedResolver`
     * `tornado.netutil.OverrideResolver`
-    * `tornado.platform.twisted.TwistedResolver`
-    * `tornado.platform.caresresolver.CaresResolver`
+    * ``tornado.platform.twisted.TwistedResolver``
+    * ``tornado.platform.caresresolver.CaresResolver``
     """
     @classmethod
     def configurable_base(cls):
@@ -190,12 +190,12 @@ class Resolver(Configurable):
         The ``host`` argument is a string which may be a hostname or a
         literal IP address.
 
-        Returns a `Future` whose result is a list of (family, address)
-        pairs, where address is a tuple suitable to pass to
-        `socket.connect` (i.e. a (host, port) pair for IPv4;
-        additional fields may be present for IPv6). If a callback is
-        passed, it will be run with the result as an argument when
-        it is complete.
+        Returns a `~concurrent.futures.Future` whose result is a list
+        of (family, address) pairs, where address is a tuple suitable
+        to pass to `socket.socket.connect` (i.e. a (host, port) pair for
+        IPv4; additional fields may be present for IPv6). If a
+        callback is passed, it will be run with the result as an
+        argument when it is complete.
         """
         raise NotImplementedError()
 
@@ -217,8 +217,8 @@ class ExecutorResolver(Resolver):
 class BlockingResolver(ExecutorResolver):
     """Default `Resolver` implementation, using `socket.getaddrinfo`.
 
-    The `IOLoop` will be blocked during the resolution, although the
-    callback will not be run until the next `IOLoop` iteration.
+    The `.IOLoop` will be blocked during the resolution, although the
+    callback will not be run until the next `.IOLoop` iteration.
     """
     def initialize(self, io_loop=None):
         super(BlockingResolver, self).initialize(io_loop=io_loop)
@@ -273,10 +273,10 @@ def ssl_options_to_context(ssl_options):
     """Try to Convert an ssl_options dictionary to an SSLContext object.
 
     The ``ssl_options`` dictionary contains keywords to be passed to
-    `ssl.wrap_sockets`.  In Python 3.2+, `ssl.SSLContext` objects can
+    `ssl.wrap_socket`.  In Python 3.2+, `ssl.SSLContext` objects can
     be used instead.  This function converts the dict form to its
-    `SSLContext` equivalent, and may be used when a component which
-    accepts both forms needs to upgrade to the `SSLContext` version
+    `~ssl.SSLContext` equivalent, and may be used when a component which
+    accepts both forms needs to upgrade to the `~ssl.SSLContext` version
     to use features like SNI or NPN.
     """
     if isinstance(ssl_options, dict):
@@ -298,12 +298,12 @@ def ssl_options_to_context(ssl_options):
 
 
 def ssl_wrap_socket(socket, ssl_options, server_hostname=None, **kwargs):
-    """Returns an `ssl.SSLSocket` wrapping the given socket.
+    """Returns an ``ssl.SSLSocket`` wrapping the given socket.
 
     ``ssl_options`` may be either a dictionary (as accepted by
-    `ssl_options_to_context) or an `ssl.SSLContext` object.
-    Additional keyword arguments are passed to `wrap_socket`
-    (either the `SSLContext` method or the `ssl` module function
+    `ssl_options_to_context`) or an `ssl.SSLContext` object.
+    Additional keyword arguments are passed to ``wrap_socket``
+    (either the `~ssl.SSLContext` method or the `ssl` module function
     as appropriate).
     """
     context = ssl_options_to_context(ssl_options)
index ee146fca06aebe177e9058b7466144204a86e384..1995938f80b31e7788f77449f83c5220399d0bca 100644 (file)
@@ -258,15 +258,16 @@ class OptionParser(object):
             callback()
 
     def mockable(self):
-        """Returns a wrapper around self that is compatible with `mock.patch`.
-
-        The `mock.patch` function (included in the standard library
-        `unittest.mock` package since Python 3.3, or in the
-        third-party `mock` package for older versions of Python) is
-        incompatible with objects like ``options`` that override
-        ``__getattr__`` and ``__setattr__``.  This function returns an
-        object that can be used with `mock.patch.object` to modify
-        option values::
+        """Returns a wrapper around self that is compatible with
+        `mock.patch <unittest.mock.patch>`.
+
+        The `mock.patch <unittest.mock.patch>` function (included in
+        the standard library `unittest.mock` package since Python 3.3,
+        or in the third-party ``mock`` package for older versions of
+        Python) is incompatible with objects like ``options`` that
+        override ``__getattr__`` and ``__setattr__``.  This function
+        returns an object that can be used with `mock.patch.object
+        <unittest.mock.patch.object>` to modify option values::
 
             with mock.patch.object(options.mockable(), 'name', value):
                 assert options.name == value
index 55481a22c9a53adec42151520a45600d627c5101..5ebe829d9fab3f4fc97111fd8a5bf5bce9a1275f 100644 (file)
@@ -169,8 +169,8 @@ class Subprocess(object):
     additions:
 
     * ``stdin``, ``stdout``, and ``stderr`` may have the value
-      `tornado.process.Subprocess.STREAM`, which will make the corresponding
-      attribute of the resulting Subprocess a `PipeIOStream`.
+      ``tornado.process.Subprocess.STREAM``, which will make the corresponding
+      attribute of the resulting Subprocess a `.PipeIOStream`.
     * A new keyword argument ``io_loop`` may be used to pass in an IOLoop.
     """
     STREAM = object()
index c30a2598f3cf68b213262dc0f99882be5461042c..ee1a9a2b76e7349182f0c71ab5535729f6ef3f27 100644 (file)
@@ -52,7 +52,7 @@ Here are a few rules of thumb for when it's necessary:
 * If you're writing an asynchronous library that doesn't rely on a
   stack_context-aware library like `tornado.ioloop` or `tornado.iostream`
   (for example, if you're writing a thread pool), use
-  `stack_context.wrap()` before any asynchronous operations to capture the
+  `.stack_context.wrap()` before any asynchronous operations to capture the
   stack context from where the operation was started.
 
 * If you're writing an asynchronous library that has some shared
index e0c5f3b640f9fcecf2503860d67039e22349272b..80bb09a94ab181a58c6fbe95d01adee37cc529d4 100644 (file)
@@ -60,9 +60,9 @@ class TCPServer(object):
             server.start(0)  # Forks multiple sub-processes
             IOLoop.instance().start()
 
-       When using this interface, an `IOLoop` must *not* be passed
+       When using this interface, an `.IOLoop` must *not* be passed
        to the `TCPServer` constructor.  `start` will always start
-       the server on the default singleton `IOLoop`.
+       the server on the default singleton `.IOLoop`.
 
     3. `add_sockets`: advanced multi-process::
 
@@ -77,7 +77,7 @@ class TCPServer(object):
        flexibility in when the fork happens.  `add_sockets` can
        also be used in single-process servers if you want to create
        your listening sockets in some way other than
-       `bind_sockets`.
+       `~tornado.netutil.bind_sockets`.
     """
     def __init__(self, io_loop=None, ssl_options=None):
         self.io_loop = io_loop
@@ -109,7 +109,7 @@ class TCPServer(object):
         This method may be called more than once to listen on multiple ports.
         `listen` takes effect immediately; it is not necessary to call
         `TCPServer.start` afterwards.  It is, however, necessary to start
-        the `IOLoop`.
+        the `.IOLoop`.
         """
         sockets = bind_sockets(port, address=address)
         self.add_sockets(sockets)
@@ -118,7 +118,7 @@ class TCPServer(object):
         """Makes this server start accepting connections on the given sockets.
 
         The ``sockets`` parameter is a list of socket objects such as
-        those returned by `bind_sockets`.
+        those returned by `~tornado.netutil.bind_sockets`.
         `add_sockets` is typically used in combination with that
         method and `tornado.process.fork_processes` to provide greater
         control over the initialization of a multi-process server.
@@ -150,7 +150,7 @@ class TCPServer(object):
         both will be used if available.
 
         The ``backlog`` argument has the same meaning as for
-        `socket.listen`.
+        `socket.socket.listen`.
 
         This method may be called multiple times prior to `start` to listen
         on multiple ports or interfaces.
@@ -200,7 +200,7 @@ class TCPServer(object):
             sock.close()
 
     def handle_stream(self, stream, address):
-        """Override to handle a new `IOStream` from an incoming connection."""
+        """Override to handle a new `.IOStream` from an incoming connection."""
         raise NotImplementedError()
 
     def _handle_connection(self, connection, address):
index 4f61de3f8fe5783b5e6e7da7ca58df3d832cfea0..f91b4b1390302135e6bbe1bdf7e10618d4ccf48b 100644 (file)
@@ -79,9 +79,10 @@ We provide the functions escape(), url_escape(), json_encode(), and squeeze()
 to all templates by default.
 
 Typical applications do not create `Template` or `Loader` instances by
-hand, but instead use the `render` and `render_string` methods of
+hand, but instead use the `~.RequestHandler.render` and
+`~.RequestHandler.render_string` methods of
 `tornado.web.RequestHandler`, which load templates automatically based
-on the ``template_path`` `Application` setting.
+on the ``template_path`` `.Application` setting.
 
 Syntax Reference
 ----------------
@@ -109,7 +110,7 @@ with ``{# ... #}``.
 ``{% autoescape *function* %}``
     Sets the autoescape mode for the current file.  This does not affect
     other files, even those referenced by ``{% include %}``.  Note that
-    autoescaping can also be configured globally, at the `Application`
+    autoescaping can also be configured globally, at the `.Application`
     or `Loader`.::
 
         {% autoescape xhtml_escape %}
index 37b75ea93a3c24ad18b2cde449158c97d07d20f2..455b68b947e1b0e6a758facb496069e929294f4f 100644 (file)
@@ -366,7 +366,7 @@ class AsyncHTTPSTestCase(AsyncHTTPTestCase):
 def gen_test(f):
     """Testing equivalent of ``@gen.coroutine``, to be applied to test methods.
 
-    ``@gen.coroutine`` cannot be used on tests because the `IOLoop` is not
+    ``@gen.coroutine`` cannot be used on tests because the `.IOLoop` is not
     already running.  ``@gen_test`` should be applied to test methods
     on subclasses of `AsyncTestCase`.
 
index fa3089f15c773ca0d0698e9948195d086a30ea38..e1f2ccbd82f8a3bc852c06f368baac4ae13ac4d4 100644 (file)
@@ -167,7 +167,7 @@ class RequestHandler(object):
 
     @property
     def settings(self):
-        """An alias for `self.application.settings`."""
+        """An alias for ``self.application.settings``."""
         return self.application.settings
 
     def head(self, *args, **kwargs):
@@ -253,10 +253,11 @@ class RequestHandler(object):
     def set_status(self, status_code, reason=None):
         """Sets the status code for our response.
 
-        :arg int status_code: Response status code. If `reason` is ``None``,
-            it must be present in `httplib.responses`.
+        :arg int status_code: Response status code. If ``reason`` is ``None``,
+            it must be present in `httplib.responses <http.client.responses>`.
         :arg string reason: Human-readable reason phrase describing the status
-            code. If ``None``, it will be filled in from `httplib.responses`.
+            code. If ``None``, it will be filled in from
+            `httplib.responses <http.client.responses>`.
         """
         self._status_code = status_code
         if reason is not None:
@@ -1456,7 +1457,7 @@ class Application(object):
         return handler
 
     def reverse_url(self, name, *args):
-        """Returns a URL path for handler named `name`
+        """Returns a URL path for handler named ``name``
 
         The handler must be added to the application as a named URLSpec.
 
@@ -1494,7 +1495,8 @@ class HTTPError(Exception):
     """An exception that will turn into an HTTP error response.
 
     :arg int status_code: HTTP status code.  Must be listed in
-        `httplib.responses` unless the ``reason`` keyword argument is given.
+        `httplib.responses <http.client.responses>` unless the ``reason``
+        keyword argument is given.
     :arg string log_message: Message to be written to the log for this error
         (will not be shown to the user unless the `Application` is in debug
         mode).  May contain ``%s``-style placeholders, which will be filled
index cf1e6d1cf739ee3d4d2dddb5c15de1d92d8fefd7..b3184862fb823a3848708be35499ea7e8e3fa612 100644 (file)
@@ -795,7 +795,8 @@ class WebSocketClientConnection(simple_httpclient._HTTPConnection):
 def websocket_connect(url, io_loop=None, callback=None):
     """Client-side websocket support.
 
-    Takes a url and returns a Future whose result is a `WebSocketConnection`.
+    Takes a url and returns a Future whose result is a
+    `WebSocketClientConnection`.
     """
     if io_loop is None:
         io_loop = IOLoop.current()