python2 buffer object support