Avoid deprecated assertions.
Add support for Python 3.4.
Add support for PyPy.

PyPy3 support is pending a release of fix for
  https://bitbucket.org/pypy/pypy/issue/1946.