From 052e7b4453d950d11025107e9c98fa0be744d72f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 18 Sep 2013 10:10:08 -0400 Subject: execfile now opens target in binary mode for better compatibility. Fixes Distribute #349. --- CHANGES.txt | 7 +++++++ setuptools/compat.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index de8285a2..1b91a2c2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES ======= +----- +1.1.6 +----- + +* Distribute #349: ``sandbox.execfile`` now opens the target file in binary + mode, thus honoring a BOM in the file when compiled. + ----- 1.1.5 ----- diff --git a/setuptools/compat.py b/setuptools/compat.py index 860c39f3..529a5fbc 100644 --- a/setuptools/compat.py +++ b/setuptools/compat.py @@ -84,7 +84,7 @@ else: globs = globals() if locs is None: locs = globs - f = open(fn) + f = open(fn, 'rb') try: source = f.read() finally: -- cgit v1.2.1