str() -> six.text_type(). Closes #2290.