scrapy/w3lib — pull request #13 by kmike (2013-10-04 00:39:52+00:00)
Title: [WIP] Python 3.3 support

All tests pass under Python 2.6, 2.7 and 3.3.

TODO:

* [ ] add tests to w3lib.form
* [ ] port w3lib.form

There are 2 types of changes:

1) dealing with moved modules and changed builtins: "six" library is used for that;
2) being more explicit about bytes and unicode: a lot of 'b's are added to constants, some tests are duplicated for byte and unicode input.

This PR should be backwards compatible besides the following:

* w3lib.http.basic_auth_header now uses ISO-8859-1 explicitly; previously it implicitly used sys.getdefaultencoding();
* setup.py is converted to setuptools;
* replace_escape_chars unicode handling is fixed.