Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cchardet #418

Merged
merged 4 commits into from
Jun 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ CHANGES
Backward-compatibility warning: this may change the url matched by
your queries if they send quoted characted (like %2F for /) #414

- Use optional cchardet accelerator if present #418


0.16.5 (06-13-2015)
-------------------
Expand Down
5 changes: 4 additions & 1 deletion aiohttp/client_reqrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 14 additions & 1 deletion docs/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,26 @@

Reference implementation of :pep:`3156`

See https://pypi.python.org/pypi/asyncio/
https://pypi.python.org/pypi/asyncio/

callable

Any object that can be called. Use :func:`callable` to check
that.

chardet

The Universal Character Encoding Detector

https://pypi.python.org/pypi/chardet/

cchardet

cChardet is high speed universal character encoding detector -
binding to charsetdetect.

https://pypi.python.org/pypi/cchardet/

web-handler

An endpoint that returns http response.
16 changes: 14 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ Library Installation

::

pip install aiohttp
$ pip install aiohttp

You may want to install *optional* :term:`cchardet` library as faster
replacement for :term:`chardet`::

$ pip install cchardet

Getting Started
---------------
Expand Down Expand Up @@ -99,6 +104,13 @@ Dependencies

- Python 3.3 and :term:`asyncio` or Python 3.4+
- *chardet* library
- *Optional* :term:`cchardet` library as faster replacement for
:term:`chardet`.

Install it manually via::

$ pip install cchardet


Contributing
------------
Expand All @@ -110,7 +122,7 @@ before making a Pull Request.
Authors and License
-------------------

The ``aiohttp`` package is written mainly by Nikolay Kim and Andrew Svetlov.
The ``aiohttp`` package is written mostly by Nikolay Kim and Andrew Svetlov.

It's *Apache 2* licensed and freely available.

Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
[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]

deps =
nose
coverage
gunicorn
chardet
cchardet: cython
cchardet: cchardet
cython: cython
old_asyncio: asyncio==3.4.1

Expand Down