Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2934fd6

Browse files
committed
Closes #25185: merged fix from 3.4.
2 parents 0b40aab + f223c53 commit 2934fd6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/site.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,9 @@ def venv(known_paths):
465465
config_line = re.compile(CONFIG_LINE)
466466
virtual_conf = candidate_confs[0]
467467
system_site = "true"
468-
with open(virtual_conf) as f:
468+
# Issue 25185: Use UTF-8, as that's what the venv module uses when
469+
# writing the file.
470+
with open(virtual_conf, encoding='utf-8') as f:
469471
for line in f:
470472
line = line.strip()
471473
m = config_line.match(line)

0 commit comments

Comments
 (0)