Parsely/streamparse — pull request #32 by dan-blanchard (2014-07-11 02:48:18+00:00)
Title: Add Python 3 compatibility

This PR makes streamparse Python 3 compatible (issue #9) by:

- Using six for `iteritems` and `reraise`
- Adding `from __future__ import absolute_import, print_function, unicode_literals` to the top of nearly every `.py` file.
- Replacing the few remaining `print` statements with `print` functions.
- Explicitly decoding/encoding all strings sent to/from spouts and bolts using UTF-8.
- Adding 3.3 to `.travis.yml`.
- Relying on a [Python 3.3 compatible fork of Fabric](https://github.com/pashinin/fabric/tree/p33) referred to in fabric/fabric#1050 until the official Python 3 compatible version of Fabric [comes out in the next few weeks](https://twitter.com/bitprophet/status/484081844162289665).
- Removing `unittest2` from `test_requires` when on Python 3.

I also fixed a few pylint issues and other general correctness things like:

- Eliminating `[]` and `{}` as default arguments as to avoid [this nonsense](http://effbot.org/zone/default-values.htm).
- Stop importing `streamparse` to `__version__` in `setup.py` to fix [potential issues where the user doesn't have all prereqs already installed](http://stackoverflow.com/questions/2058802/how-can-i-get-the-version-defined-in-setup-py-setuptools-in-my-package).
- Switch to using `README.rst` instead of `README.md` and made `setup.py` automatically use that as the `long_description` for PyPI.

I have not extensively test this beyond making sure all the unit tests pass on 2.7 and 3.3 on Travis, so let me know if I missed something.