Github user BryanCutler commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20838#discussion_r177176851
  
    --- Diff: dev/create-release/releaseutils.py ---
    @@ -149,7 +152,11 @@ def get_commits(tag):
                 if not is_valid_author(author):
                     author = github_username
             # Guard against special characters
    -        author = unidecode.unidecode(unicode(author, "UTF-8")).strip()
    +        try:               # Python 2
    +            author = unicode(author, "UTF-8")
    +        except NameError:  # Python 3
    +            author = str(author)
    +        author = unidecode.unidecode(author).strip()
    --- End diff --
    
    could you just put this above:
    ```
    if sys.version > '3':
        unicode = str
    ```
    and then just do?
    ```
    author = unidecode.unidecode(unicode(author)).strip()
    ```
    
    I don't think you need to specify "UTF-8" because either way it will be a 
unicode object


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to