Implement exception generation for Python 2.
Partial protocol specification.