MTG/acousticbrainz-client — pull request #22 by JonnyJD (2014-10-24 13:55:10+00:00)
Title: Python 3 support

The code was already somewhat prepared for Python 3 with things like `from __future__ import printfuction`.
However, some things still didn't work.

Relative import had to be changed since these work a bit differently. `from abz import ...` is the generic solution to this.
The the "vendor requests" needs the `from .vendor import` fix, which is relative to the script for Python 2 and 3 (`from vendor` is relative to the abz module for Python 3).

2 modules were renamed in Python 3 (urlparse, configparser)

In Python 3 strings are "unicode strings" by default. In Python 2 many things are byte strings. We just use a decode function that checks if the argument really is a byte string or "already" unicode.

Quick tests on Python 2.6, 2.7, 3.1, 3.2, 3.3 and 3.4. More extensive tests (running on my music-db) were done with Python 2.7.9 and 3.4.2. I tried if I can get tox to work ad-hoc, but I failed with the "streaming_extractor_music dependency". I did some manual tests with different system-wide python versions.