]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
More doc updates.
authorBen Darnell <ben@bendarnell.com>
Sun, 19 Apr 2015 16:37:43 +0000 (12:37 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 19 Apr 2015 16:37:43 +0000 (12:37 -0400)
docs/conf.py
docs/httpclient.rst
docs/process.rst
docs/releases/next.rst
tornado/httpserver.py
tornado/simple_httpclient.py

index a37a70d8cd10cb4ebafd9b9352964b86fead1f5d..368e4e85c64a6244feec3172610d3f60c3e7d55b 100644 (file)
@@ -43,7 +43,6 @@ coverage_ignore_classes = [
     "TracebackFuture",
 
     # tornado.gen
-    "Multi",
     "Runner",
 
     # tornado.ioloop
@@ -71,9 +70,6 @@ coverage_ignore_functions = [
     # parse_qs_bytes should probably be documented but it's complicated by
     # having different implementations between py2 and py3.
     "parse_qs_bytes",
-
-    # tornado.gen
-    "multi_future",
 ]
 
 html_favicon = 'favicon.ico'
index 4fde7b50271c2c63b0595c428cb7d4bd4813b7ff..a641fa2932fbffc30cb0ac2e3fab4adeeb8e592d 100644 (file)
 
       # Just print the headers
       python -m tornado.httpclient --print_headers --print_body=false http://www.google.com
+
+Implementations
+~~~~~~~~~~~~~~~
+
+.. automodule:: tornado.simple_httpclient
+   :members:
+
+.. module:: tornado.curl_httpclient
+
+.. class:: CurlAsyncHTTPClient(io_loop, max_clients=10, defaults=None)
+
+   ``libcurl``-based HTTP client.
index c9ce63b8152fd729b59c9dc17511ed9449a2c41e..464469fac1ce07b47817b641da827d0c435b8cd5 100644 (file)
@@ -3,3 +3,7 @@
 
 .. automodule:: tornado.process
    :members:
+
+   .. exception:: CalledProcessError
+
+      An alias for `subprocess.CalledProcessError`.
index 9b41deb456ad1b9e525bdf8ddeffbec18dad8837..9fb349495016718350899e668bb088ad94380f6b 100644 (file)
@@ -107,8 +107,8 @@ Then the Tornado equivalent is::
 * `.run_on_executor` now accepts arguments to control which attributes
   it uses to find the `.IOLoop` and executor.
 
-``tornado.curl_httpclient``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
+`tornado.curl_httpclient`
+~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * Fixed a bug that would cause the client to stop processing requests
   if an exception occurred in certain places while there is a queue.
@@ -186,8 +186,8 @@ Then the Tornado equivalent is::
 * New method `.Subprocess.wait_for_exit` is a coroutine-friendly
   version of `.Subprocess.set_exit_callback`.
 
-``tornado.simple_httpclient``
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+`tornado.simple_httpclient`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * Improved performance on Python 3 by reusing a single `ssl.SSLContext`.
 * New constructor argument ``max_body_size`` controls the maximum response
index 6062b793668009e2c9f1ff35e39658e51beb5388..2dd04dd7a87a0550f15ccab3e7a9ce61c8a2200e 100644 (file)
@@ -121,6 +121,9 @@ class HTTPServer(TCPServer, Configurable,
        `.HTTPServerConnectionDelegate.start_request` is now called with
        two arguments ``(server_conn, request_conn)`` (in accordance with the
        documentation) instead of one ``(request_conn)``.
+
+    .. versionchanged:: 4.2
+       `HTTPServer` is now a subclass of `tornado.util.Configurable`.
     """
     def __init__(self, *args, **kwargs):
         # Ignore args to __init__; real initialization belongs in
index 0319ff4409bf828e86486f431646817de83e177d..cf58e16263bc98fd1b9802845e295f15c17b440e 100644 (file)
@@ -50,9 +50,6 @@ class SimpleAsyncHTTPClient(AsyncHTTPClient):
     """Non-blocking HTTP client with no external dependencies.
 
     This class implements an HTTP 1.1 client on top of Tornado's IOStreams.
-    It does not currently implement all applicable parts of the HTTP
-    specification, but it does enough to work with major web service APIs.
-
     Some features found in the curl-based AsyncHTTPClient are not yet
     supported.  In particular, proxies are not supported, connections
     are not reused, and callers cannot select the network interface to be
@@ -66,20 +63,33 @@ class SimpleAsyncHTTPClient(AsyncHTTPClient):
 
         Only a single AsyncHTTPClient instance exists per IOLoop
         in order to provide limitations on the number of pending connections.
-        force_instance=True may be used to suppress this behavior.
+        ``force_instance=True`` may be used to suppress this behavior.
+
+        Note that because of this implicit reuse, unless ``force_instance``
+        is used, only the first call to the constructor actually uses
+        its arguments. It is recommended to use the ``configure`` method
+        instead of the constructor to ensure that arguments take effect.
 
-        max_clients is the number of concurrent requests that can be
-        in progress.  Note that this arguments are only used when the
-        client is first created, and will be ignored when an existing
-        client is reused.
+        ``max_clients`` is the number of concurrent requests that can be
+        in progress; when this limit is reached additional requests will be
+        queued. Note that time spent waiting in this queue still counts
+        against the ``request_timeout``.
 
-        hostname_mapping is a dictionary mapping hostnames to IP addresses.
+        ``hostname_mapping`` is a dictionary mapping hostnames to IP addresses.
         It can be used to make local DNS changes when modifying system-wide
-        settings like /etc/hosts is not possible or desirable (e.g. in
+        settings like ``/etc/hosts`` is not possible or desirable (e.g. in
         unittests).
 
-        max_buffer_size is the number of bytes that can be read by IOStream. It
-        defaults to 100mb.
+        ``max_buffer_size`` (default 100MB) is the number of bytes
+        that can be read into memory at once. ``max_body_size``
+        (defaults to ``max_buffer_size``) is the largest response body
+        that the client will accept.  Without a
+        ``streaming_callback``, the smaller of these two limits
+        applies; with a ``streaming_callback`` only ``max_body_size``
+        does.
+
+        .. versionchanged:: 4.2
+           Added the ``max_body_size`` argument.
         """
         super(SimpleAsyncHTTPClient, self).initialize(io_loop,
                                                       defaults=defaults)