[stream] fixed: python2 compatibility