Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def addpackage(sitedir, name, known_paths):
fullname = os.path.join(sitedir, name)
_trace(f"Processing .pth file: {fullname!r}")
try:
f = io.TextIOWrapper(io.open_code(fullname))
f = io.TextIOWrapper(io.open_code(fullname), encoding="utf-8")
except OSError:
return
with f:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix ``site`` module used locale-specific encoding for opening ``.pth``
files.