Skip to content

Commit

Permalink
Fix #20: Explicitly use UTF8 encoding in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Nov 7, 2016
1 parent 23ec6d8 commit 3dae2cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def build_extension(self, ext):
here = pathlib.Path(__file__).parent
fname = here / 'yarl' / '__init__.py'

with codecs.open(str(fname), 'r', 'latin1') as fp:
with fname.open(encoding='utf8') as fp:
try:
version = re.findall(r"^__version__ = '([^']+)'$", fp.read(), re.M)[0]
except IndexError:
Expand All @@ -62,7 +62,7 @@ def build_extension(self, ext):

def read(name):
fname = here / name
with fname.open() as f:
with fname.open(encoding='utf8') as f:
return f.read()


Expand Down

0 comments on commit 3dae2cb

Please sign in to comment.