Skip to content

Commit

Permalink
Make SimpleAsyncHTTPClient the default.
Browse files Browse the repository at this point in the history
Get rid of the environment variable hack for selecting client
implementations.
  • Loading branch information
bdarnell committed Feb 23, 2011
1 parent 9fc882a commit e42c99f
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions tornado/httpclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,8 @@ def __new__(cls, io_loop=None, max_clients=10, force_instance=False,
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
Expand Down

0 comments on commit e42c99f

Please sign in to comment.