-
-
Notifications
You must be signed in to change notification settings - Fork 550
Closed
Labels
bug:normalaffects many people or has quite an impactaffects many people or has quite an impact
Description
tox/src/tox/config/__init__.py
Lines 304 to 306 in 555f3f1
| def get_py_project_toml(path): | |
| with open(str(path)) as file_handler: | |
| config_data = toml.load(file_handler) |
toml must be encoded by UTF-8. Please add encoding="utf-8" here.
It may cause UnicodeDecodeError when pyproject.toml contains non-ASCII character and locale encoding is not UTF-8 (e.g. Windows).
Lines 52 to 55 in 555f3f1
| with TemporaryFile("wt") as file: | |
| with redirect_stdout(file): | |
| with redirect_stderr(file): | |
| yield |
On Windows, stdout is UTF-8 encoded when it is console (e.g. _WinConsoleIO), but the default encoding of TemporaryFile() is legacy encoding. So UTF-8 is better encoding for this purpose.
This is not a real bug because this function is used only here:
tox/src/tox/session/__init__.py
Line 54 in cfe38bb
| with suppress_output(): |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bug:normalaffects many people or has quite an impactaffects many people or has quite an impact