fix proxy code for Python 3

#335 broke Python 3 support.

This requires a new release of the Python 3 package.