]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Remove redundant uses of @asynchronous with @gen.coroutine.
authorBen Darnell <ben@bendarnell.com>
Fri, 3 Jan 2014 01:51:59 +0000 (20:51 -0500)
committerBen Darnell <ben@bendarnell.com>
Fri, 3 Jan 2014 01:51:59 +0000 (20:51 -0500)
demos/auth/authdemo.py
demos/chat/chatdemo.py
tornado/auth.py
tornado/gen.py
tornado/test/gen_test.py

index 78db9740bed012531a6bb69dfa46a7877f2ac401..9b484df6b61e398b76d0d75bfda1aa54ccb6b50e 100755 (executable)
@@ -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):
index 095f7784c16470788d8c93daa16d91e7b58975b3..a8f5bb81f9c2d36eddefa9d6422bd824d1a1978a 100755 (executable)
@@ -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):
index 0881b05189c56160f7247bb865f8e7d9f9474184..b7ab57aea069df65ffef23a5161b676c8e739606 100644 (file)
@@ -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(
index 21f692ab9ad15d09032f7bd58807a24929678508..aa931b45724af651827abce979aeb8db50c5ee3e 100644 (file)
@@ -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()
index 726d131da7f46bde1f84f6493d145011d6871606..5a463f817349e59635ac6dd9e60d2f3ed77a52ed 100644 (file)
@@ -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.