From c9af9a7224b1f42e91ad88b0a3f8f10478584b0a Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Thu, 2 Jan 2014 20:51:59 -0500 Subject: [PATCH] Remove redundant uses of @asynchronous with @gen.coroutine. --- demos/auth/authdemo.py | 1 - demos/chat/chatdemo.py | 1 - tornado/auth.py | 9 --------- tornado/gen.py | 1 - tornado/test/gen_test.py | 1 - 5 files changed, 13 deletions(-) diff --git a/demos/auth/authdemo.py b/demos/auth/authdemo.py index 78db9740b..9b484df6b 100755 --- a/demos/auth/authdemo.py +++ b/demos/auth/authdemo.py @@ -56,7 +56,6 @@ class MainHandler(BaseHandler): class AuthHandler(BaseHandler, tornado.auth.GoogleMixin): - @tornado.web.asynchronous @gen.coroutine def get(self): if self.get_argument("openid.mode", None): diff --git a/demos/chat/chatdemo.py b/demos/chat/chatdemo.py index 095f7784c..a8f5bb81f 100755 --- a/demos/chat/chatdemo.py +++ b/demos/chat/chatdemo.py @@ -117,7 +117,6 @@ class MessageUpdatesHandler(BaseHandler): class AuthLoginHandler(BaseHandler, tornado.auth.GoogleMixin): - @tornado.web.asynchronous @gen.coroutine def get(self): if self.get_argument("openid.mode", None): diff --git a/tornado/auth.py b/tornado/auth.py index 0881b0518..b7ab57aea 100644 --- a/tornado/auth.py +++ b/tornado/auth.py @@ -36,7 +36,6 @@ Example usage for Google OpenID:: class GoogleLoginHandler(tornado.web.RequestHandler, tornado.auth.GoogleMixin): - @tornado.web.asynchronous @tornado.gen.coroutine def get(self): if self.get_argument("openid.mode", None): @@ -607,7 +606,6 @@ class TwitterMixin(OAuthMixin): class TwitterLoginHandler(tornado.web.RequestHandler, tornado.auth.TwitterMixin): - @tornado.web.asynchronous @tornado.gen.coroutine def get(self): if self.get_argument("oauth_token", None): @@ -669,7 +667,6 @@ class TwitterMixin(OAuthMixin): class MainHandler(tornado.web.RequestHandler, tornado.auth.TwitterMixin): @tornado.web.authenticated - @tornado.web.asynchronous @tornado.gen.coroutine def get(self): new_entry = yield self.twitter_request( @@ -748,7 +745,6 @@ class FriendFeedMixin(OAuthMixin): class FriendFeedLoginHandler(tornado.web.RequestHandler, tornado.auth.FriendFeedMixin): - @tornado.web.asynchronous @tornado.gen.coroutine def get(self): if self.get_argument("oauth_token", None): @@ -793,7 +789,6 @@ class FriendFeedMixin(OAuthMixin): class MainHandler(tornado.web.RequestHandler, tornado.auth.FriendFeedMixin): @tornado.web.authenticated - @tornado.web.asynchronous @tornado.gen.coroutine def get(self): new_entry = yield self.friendfeed_request( @@ -877,7 +872,6 @@ class GoogleMixin(OpenIdMixin, OAuthMixin): class GoogleLoginHandler(tornado.web.RequestHandler, tornado.auth.GoogleMixin): - @tornado.web.asynchronous @tornado.gen.coroutine def get(self): if self.get_argument("openid.mode", None): @@ -965,7 +959,6 @@ class GoogleOAuth2Mixin(OAuth2Mixin): Example usage:: class GoogleOAuth2LoginHandler(LoginHandler, tornado.auth.GoogleOAuth2Mixin): - @tornado.web.asynchronous @tornado.gen.coroutine def get(self): if self.get_argument("code", False): @@ -1237,7 +1230,6 @@ class FacebookGraphMixin(OAuth2Mixin): Example usage:: class FacebookGraphLoginHandler(LoginHandler, tornado.auth.FacebookGraphMixin): - @tornado.web.asynchronous @tornado.gen.coroutine def get(self): if self.get_argument("code", False): @@ -1324,7 +1316,6 @@ class FacebookGraphMixin(OAuth2Mixin): class MainHandler(tornado.web.RequestHandler, tornado.auth.FacebookGraphMixin): @tornado.web.authenticated - @tornado.web.asynchronous @tornado.gen.coroutine def get(self): new_entry = yield self.facebook_request( diff --git a/tornado/gen.py b/tornado/gen.py index 21f692ab9..aa931b457 100644 --- a/tornado/gen.py +++ b/tornado/gen.py @@ -59,7 +59,6 @@ For more complicated interfaces, `Task` can be split into two parts: `Callback` and `Wait`:: class GenAsyncHandler2(RequestHandler): - @asynchronous @gen.coroutine def get(self): http_client = AsyncHTTPClient() diff --git a/tornado/test/gen_test.py b/tornado/test/gen_test.py index 726d131da..5a463f817 100644 --- a/tornado/test/gen_test.py +++ b/tornado/test/gen_test.py @@ -838,7 +838,6 @@ class GenExceptionHandler(RequestHandler): class GenCoroutineExceptionHandler(RequestHandler): - @asynchronous @gen.coroutine def get(self): # This test depends on the order of the two decorators. -- 2.47.2