Made BufferGenerateRequest Python 3 compatible.