[Python-checkins] cpython (merge 3.4 -> 3.5): Closes #25185: merged fix from 3.4.

vinay.sajip python-checkins at python.org
Thu Oct 1 06:28:51 EDT 2015


https://hg.python.org/cpython/rev/eaf9220bdee3
changeset: 98462:eaf9220bdee3
branch: 3.5
parent: 98459:10c13441bf8d
parent: 98461:d927c6cae05f
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Thu Oct 01 11:27:57 2015 +0100
summary:
 Closes #25185: merged fix from 3.4.
files:
 Lib/site.py | 4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/site.py b/Lib/site.py
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -465,7 +465,9 @@
 config_line = re.compile(CONFIG_LINE)
 virtual_conf = candidate_confs[0]
 system_site = "true"
- with open(virtual_conf) as f:
+ # Issue 25185: Use UTF-8, as that's what the venv module uses when
+ # writing the file.
+ with open(virtual_conf, encoding='utf-8') as f:
 for line in f:
 line = line.strip()
 m = config_line.match(line)
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /