diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2020-12-24 14:13:52 -0800 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2020-12-25 15:53:08 -0800 |
commit | a1fff4a080d1148599c30b074a8dcbb37475701f (patch) | |
tree | 68f54cc666faa92c8af39dfc41b0c6cad59b8944 /setup.py | |
parent | f91ba6b348c467f8c97dc959b413cc6fd13ae199 (diff) | |
download | pip-a1fff4a080d1148599c30b074a8dcbb37475701f.tar.gz |
Replace io.open() and codecs.open() with builtin open()
In Python 3, these are functionally equivalent and share the same
feature set.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1,7 +1,6 @@ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False -import codecs import os import sys @@ -12,7 +11,7 @@ def read(rel_path): here = os.path.abspath(os.path.dirname(__file__)) # intentionally *not* adding an encoding option to open, See: # https://github.com/pypa/virtualenv/issues/201#issuecomment-3145690 - with codecs.open(os.path.join(here, rel_path), 'r') as fp: + with open(os.path.join(here, rel_path), 'r') as fp: return fp.read() |