From f690a2b68b53cf89a6ee6ff10c3c70e743da34a7 Mon Sep 17 00:00:00 2001 From: "John W. O'Brien" Date: Sun, 22 Nov 2020 13:50:18 -0500 Subject: [PATCH] Use ASCII decoding explicitly in setup.py --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4e75c12..03bcfe7 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ from __future__ import with_statement +from io import open import os import re try: @@ -14,8 +15,9 @@ NAME = 'colorama' -def read_file(path): - with open(os.path.join(os.path.dirname(__file__), path)) as fp: +def read_file(path, encoding='ascii'): + with open(os.path.join(os.path.dirname(__file__), path), + encoding=encoding) as fp: return fp.read() def _get_version_match(content):