]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Pyflakes cleanup.
authorBen Darnell <ben@bendarnell.com>
Sun, 25 May 2014 03:23:46 +0000 (23:23 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 25 May 2014 03:23:46 +0000 (23:23 -0400)
Includes real python3 bugfixes for tornado.auth.FacebookMixin and
tornado.platform.twisted.

tornado/auth.py
tornado/platform/twisted.py
tornado/simple_httpclient.py
tornado/tcpclient.py
tornado/test/web_test.py

index 9baac9baf8d54d4b70858bb6943c400bc7d7b06d..6b1dd10e798a153695ed387fe6b16221856d6a71 100644 (file)
@@ -73,6 +73,10 @@ try:
 except ImportError:
     import urllib as urllib_parse  # py2
 
+try:
+    long  # py2
+except NameError:
+    long = int  # py3
 
 class AuthError(Exception):
     pass
index 5ef4e9b0fbc8b3d38c97ce1f2dbab3d7e929226f..889aa3c450dfe389a3928ea28fdc64aa89c4df30 100644 (file)
@@ -91,6 +91,11 @@ from tornado.netutil import Resolver
 from tornado.stack_context import NullContext, wrap
 from tornado.ioloop import IOLoop
 
+try:
+    long  # py2
+except NameError:
+    long = int  # py3
+
 
 @implementer(IDelayedCall)
 class TornadoDelayedCall(object):
index 2d90b0470c53cfe4564e7efa549d9b1d18c7c260..ddbaa9c0041ac4a0441e5a67e15181268b4bd275 100644 (file)
@@ -6,7 +6,7 @@ from tornado.escape import utf8, _unicode
 from tornado.httpclient import HTTPResponse, HTTPError, AsyncHTTPClient, main, _RequestProxy
 from tornado import httputil
 from tornado.http1connection import HTTP1Connection, HTTP1ConnectionParameters
-from tornado.iostream import IOStream, SSLIOStream, StreamClosedError
+from tornado.iostream import StreamClosedError
 from tornado.netutil import Resolver, OverrideResolver
 from tornado.log import gen_log
 from tornado import stack_context
index f29c29c1c68c8bd703c9e70b17056a4dc6ee3833..4354a2ba2cc302fab618021107b8b2514bc9db08 100644 (file)
@@ -23,7 +23,7 @@ import socket
 
 from tornado.concurrent import Future
 from tornado.ioloop import IOLoop
-from tornado.iostream import IOStream, SSLIOStream
+from tornado.iostream import IOStream
 from tornado import gen
 from tornado.netutil import Resolver
 
index eef5126955d2b8b59e2ff21dc88c1c5eebb94958..d7762a730aac55e53551a2a77f83ac14982a0ce0 100644 (file)
@@ -578,8 +578,8 @@ class WSGISafeWebTest(WebTestCase):
                 "/decode_arg/%E9?foo=%E9&encoding=latin1",
                 "/decode_arg_kw/%E9?foo=%E9&encoding=latin1",
                 ]
-        for url in urls:
-            response = self.fetch(url)
+        for req_url in urls:
+            response = self.fetch(req_url)
             response.rethrow()
             data = json_decode(response.body)
             self.assertEqual(data, {u('path'): [u('unicode'), u('\u00e9')],
@@ -605,8 +605,8 @@ class WSGISafeWebTest(WebTestCase):
         # These urls are all equivalent.
         urls = ["/decode_arg/1%20%2B%201?foo=1%20%2B%201&encoding=utf-8",
                 "/decode_arg/1%20+%201?foo=1+%2B+1&encoding=utf-8"]
-        for url in urls:
-            response = self.fetch(url)
+        for req_url in urls:
+            response = self.fetch(req_url)
             response.rethrow()
             data = json_decode(response.body)
             self.assertEqual(data, {u('path'): [u('unicode'), u('1 + 1')],