Python3 port of thrift 0.9.1