]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Make SimpleAsyncHTTPClient the default.
authorBen Darnell <ben@bendarnell.com>
Wed, 23 Feb 2011 22:51:35 +0000 (14:51 -0800)
committerBen Darnell <ben@bendarnell.com>
Wed, 23 Feb 2011 22:51:35 +0000 (14:51 -0800)
Get rid of the environment variable hack for selecting client
implementations.

tornado/httpclient.py

index 0c6515a081f1424bb662609ce2bcded4c076855d..63107dd8f2c7de131307864ec956c84b4498ef7c 100644 (file)
@@ -87,20 +87,8 @@ class AsyncHTTPClient(object):
         else:
             if cls is AsyncHTTPClient:
                 if cls._impl_class is None:
-                    # If the environment variable
-                    # USE_SIMPLE_HTTPCLIENT is set to a non-empty
-                    # string, use simple_httpclient instead of
-                    # curl_httpclient.  This is provided as a
-                    # convenience for testing simple_httpclient, and
-                    # may be removed or replaced with a better way of
-                    # specifying the preferred HTTPClient
-                    # implementation before the next release.
-                    if os.environ.get("USE_SIMPLE_HTTPCLIENT"):
-                        from tornado.simple_httpclient import SimpleAsyncHTTPClient
-                        AsyncHTTPClient._impl_class = SimpleAsyncHTTPClient
-                    else:
-                        from tornado.curl_httpclient import CurlAsyncHTTPClient
-                        AsyncHTTPClient._impl_class = CurlAsyncHTTPClient
+                    from tornado.simple_httpclient import SimpleAsyncHTTPClient
+                    AsyncHTTPClient._impl_class = SimpleAsyncHTTPClient
                 impl = cls._impl_class
             else:
                 impl = cls