From 1535dac8c1db65c2da6b37868e129de24ed379c5 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sat, 21 Jun 2014 14:20:15 -0400 Subject: [PATCH] Update docs for deprecations and removals. --- docs/overview.rst | 7 ------- docs/releases/next.rst | 4 +++- docs/releases/v2.2.0.rst | 4 ++-- docs/websocket.rst | 2 -- tornado/auth.py | 14 ++++++++------ tornado/testing.py | 4 ++-- 6 files changed, 15 insertions(+), 20 deletions(-) diff --git a/docs/overview.rst b/docs/overview.rst index 21ccb79d..77d930ae 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -199,13 +199,6 @@ argument (note that this exception is not guaranteed to be the current exception in ``sys.exc_info``, so ``write_error`` must use e.g. `traceback.format_exception` instead of `traceback.format_exc`). -In Tornado 2.0 and earlier, custom error pages were implemented by overriding -``RequestHandler.get_error_html``, which returned the error page as a string -instead of calling the normal output methods (and had slightly different -semantics for exceptions). This method is still supported, but it is -deprecated and applications are encouraged to switch to -`RequestHandler.write_error`. - Redirection ~~~~~~~~~~~ diff --git a/docs/releases/next.rst b/docs/releases/next.rst index 445728d5..2b5e7204 100644 --- a/docs/releases/next.rst +++ b/docs/releases/next.rst @@ -115,7 +115,9 @@ Other notes for public use; applications are expected to write their responses via the `.HTTPConnection` interface. * The `.HTTPServerRequest.write` and `.HTTPServerRequest.finish` methods - are now deprecated. + are now deprecated. (`.RequestHandler.write` and `.RequestHandler.finish` + are *not* deprecated; this only applies to the methods on + `.HTTPServerRequest`) * `.HTTPServer` now supports `.HTTPServerConnectionDelegate` in addition to the old ``request_callback`` interface. The delegate interface supports streaming of request bodies. diff --git a/docs/releases/v2.2.0.rst b/docs/releases/v2.2.0.rst index 93df0f88..a3298c55 100644 --- a/docs/releases/v2.2.0.rst +++ b/docs/releases/v2.2.0.rst @@ -98,12 +98,12 @@ Backwards-incompatible changes * Many bugs were fixed in all supported protocol versions. * `tornado.websocket` no longer supports the older "draft 76" version of the websocket protocol by default, although this version can - be enabled by overriding `tornado.websocket.WebSocketHandler.allow_draft76`. + be enabled by overriding ``tornado.websocket.WebSocketHandler.allow_draft76``. * `.WebSocketHandler.write_message` now accepts a ``binary`` argument to send binary messages. * Subprotocols (i.e. the ``Sec-WebSocket-Protocol`` header) are now supported; see the `.WebSocketHandler.select_subprotocol` method for details. -* `.WebSocketHandler.get_websocket_scheme` can be used to select the +* ``.WebSocketHandler.get_websocket_scheme`` can be used to select the appropriate url scheme (``ws://`` or ``wss://``) in cases where ``HTTPRequest.protocol`` is not set correctly. diff --git a/docs/websocket.rst b/docs/websocket.rst index d1ec8ad5..9e1aca8c 100644 --- a/docs/websocket.rst +++ b/docs/websocket.rst @@ -22,9 +22,7 @@ Configuration ------------- - .. automethod:: WebSocketHandler.allow_draft76 .. automethod:: WebSocketHandler.check_origin - .. automethod:: WebSocketHandler.get_websocket_scheme .. automethod:: WebSocketHandler.set_nodelay Other diff --git a/tornado/auth.py b/tornado/auth.py index f8dadb66..7bd3fa1e 100644 --- a/tornado/auth.py +++ b/tornado/auth.py @@ -883,9 +883,10 @@ class FriendFeedMixin(OAuthMixin): class GoogleMixin(OpenIdMixin, OAuthMixin): """Google Open ID / OAuth authentication. - *Deprecated:* New applications should use `GoogleOAuth2Mixin` - below instead of this class. As of May 19, 2014, Google has stopped - supporting registration-free authentication. + .. deprecated:: 4.0 + New applications should use `GoogleOAuth2Mixin` + below instead of this class. As of May 19, 2014, Google has stopped + supporting registration-free authentication. No application registration is necessary to use Google for authentication or to access Google resources on behalf of a user. @@ -1053,9 +1054,10 @@ class GoogleOAuth2Mixin(OAuth2Mixin): class FacebookMixin(object): """Facebook Connect authentication. - *Deprecated:* New applications should use `FacebookGraphMixin` - below instead of this class. This class does not support the - Future-based interface seen on other classes in this module. + .. deprecated:: 1.1 + New applications should use `FacebookGraphMixin` + below instead of this class. This class does not support the + Future-based interface seen on other classes in this module. To authenticate with Facebook, register your application with Facebook at http://www.facebook.com/developers/apps.php. Then diff --git a/tornado/testing.py b/tornado/testing.py index b1564aa6..b4bfb274 100644 --- a/tornado/testing.py +++ b/tornado/testing.py @@ -70,8 +70,8 @@ def get_unused_port(): only that a series of get_unused_port calls in a single process return distinct ports. - **Deprecated**. Use bind_unused_port instead, which is guaranteed - to find an unused port. + .. deprecated:: + Use bind_unused_port instead, which is guaranteed to find an unused port. """ global _next_port port = _next_port