Instead of str, can't we use `six.text_type`