diff --git a/aiohttp/client_reqrep.py b/aiohttp/client_reqrep.py index 5cf4dcd8592..9acf4252be6 100644 --- a/aiohttp/client_reqrep.py +++ b/aiohttp/client_reqrep.py @@ -9,7 +9,10 @@ import urllib.parse import warnings -import chardet +try: + import cchardet as chardet +except ImportError: + import chardet import aiohttp from . import hdrs, helpers, streams diff --git a/tox.ini b/tox.ini index 5535ab37179..773ccb071c9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] -envlist = check, {old_asyncio,py33,py34}-{debug,release}-{cython,pure}, reportcov +envlist = check, {old_asyncio,py33,py34}-{debug,release}-{cchardet,cython,pure}, reportcov [testenv] @@ -8,7 +8,8 @@ deps = nose coverage gunicorn - chardet + cchardet: cython + cchardet: cchardet cython: cython old_asyncio: asyncio==3.4.1