Does `serializers.serialize` write bytes or text to the stream? In the case of the later we should probably use codecs.open or similar (for py2 at least)