diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b241eeb32..95551d61f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: hooks: - id: validate-pyproject - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.12.3" + rev: "v0.12.4" hooks: - id: ruff-format - id: ruff diff --git a/src/tox/config/source/ini.py b/src/tox/config/source/ini.py index 90dd40f53..bee5bc72c 100644 --- a/src/tox/config/source/ini.py +++ b/src/tox/config/source/ini.py @@ -32,7 +32,7 @@ def __init__(self, path: Path, content: str | None = None) -> None: if content is None: if not path.exists(): raise ValueError - content = path.read_text() + content = path.read_text(encoding="utf-8") self._parser.read_string(content, str(path)) self._section_mapping: defaultdict[str, list[str]] = defaultdict(list) diff --git a/tests/execute/local_subprocess/bad_process.py b/tests/execute/local_subprocess/bad_process.py index 395500020..72b18aa2f 100644 --- a/tests/execute/local_subprocess/bad_process.py +++ b/tests/execute/local_subprocess/bad_process.py @@ -32,7 +32,7 @@ def _p(m: str) -> None: try: start_file = Path(sys.argv[1]) _p(f"create {start_file}") - start_file.write_text("") + start_file.write_text("", encoding="utf-8") _p(f"created {start_file}") while True: time.sleep(0.01)