From 1eeb1037b2cb04e79be33452f8b31a9b5dca4406 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 27 Dec 2016 20:03:35 -0500 Subject: Fix installation in ascii-default environments. #540 --- CHANGES.rst | 6 +++++- setup.py | 4 ++-- tests/test_misc.py | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index e3301df..cb0807b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,7 +8,11 @@ Change history for Coverage.py Unreleased ---------- -Nothing yet... +- Some environments couldn't install 4.3, as described in `issue 540`_. This is + now fixed. + +.. _issue 540: https://bitbucket.org/ned/coveragepy/issues/540/cant-install-coverage-v43-into-under + Version 4.3 --- 2016-12-27 diff --git a/setup.py b/setup.py index 0e89306..282439f 100644 --- a/setup.py +++ b/setup.py @@ -46,8 +46,8 @@ with open(cov_ver_py) as version_file: with open("README.rst") as readme: long_description = readme.read().replace("http://coverage.readthedocs.io", __url__) -with open("CONTRIBUTORS.txt") as contributors: - paras = contributors.read().split("\n\n") +with open("CONTRIBUTORS.txt", "rb") as contributors: + paras = contributors.read().split(b"\n\n") num_others = len(paras[-1].splitlines()) num_others += 1 # Count Gareth Rees, who is mentioned in the top paragraph. diff --git a/tests/test_misc.py b/tests/test_misc.py index 96b5100..83a2aec 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -104,6 +104,11 @@ class SetupPyTest(CoverageTest): run_in_temp_dir = False + def setUp(self): + super(SetupPyTest, self).setUp() + # Force the most restrictive interpretation. + self.set_environ('LC_ALL', 'C') + def test_metadata(self): status, output = self.run_command_status( "python setup.py --description --version --url --author" -- cgit v1.2.1