Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 7: read_text(encoding='utf-8') #3625

Merged
merged 1 commit into from Apr 2, 2022

Commits on Jan 5, 2022

  1. CentOS 7: read_text(encoding='utf-8')

    With CentOS 7 Python 3.6, running install from source with pip failed:
    
        sudo podman run -ti --rm centos:7
        yum -y update
        yum -y install epel-release
        yum -y install git python3 python3-devel python3-pip python3-setuptools python3-wheel
        git clone https://github.com/samuelcolvin/pydantic.git
        cd pydantic
        pip3 install .
    
    With following error message:
    
        [root@c99d0585636c pydantic]# pip3 install .
        Processing /pydantic
            Complete output from command python setup.py egg_info:
            Traceback (most recent call last):
              File "<string>", line 1, in <module>
              File "/tmp/pip-91v_ixvz-build/setup.py", line 62, in <module>
                history = (THIS_DIR / 'HISTORY.md').read_text()
              File "/usr/lib64/python3.6/pathlib.py", line 1197, in read_text
                return f.read()
              File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
                return codecs.ascii_decode(input, self.errors)[0]
            UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 14648: ordinal not in range(128)
    
            ----------------------------------------
        Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-91v_ixvz-build/
    
    This PR add the required `read_text(encoding='utf-8')` for `setup.py`.
    
    Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
    hswong3i committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    15287e4 View commit details
    Browse the repository at this point in the history