Skip to content

Commit bc20ed5

Browse files
committed
Open log file with utf-8 encoding.
Updated pycln version due to this issue: hadialqattan/pycln#249
1 parent 3339d67 commit bc20ed5

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repos:
2828
hooks:
2929
- id: black
3030
- repo: https://github.com/hadialqattan/pycln # removes unused imports
31-
rev: v2.3.0
31+
rev: v2.5.0
3232
hooks:
3333
- id: pycln
3434
language_version: '3.11'

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## Unreleased
9+
10+
### Fixed
11+
12+
- Fixed logging to a file on Windows https://github.com/Textualize/textual/issues/5941
13+
814
## [3.7.1] - 2025-07-09
915

1016
### Fixed

src/textual/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __call__(self, *args: object, **kwargs) -> None:
9090
)
9191
output = f"{output} {key_values}" if output else key_values
9292

93-
with open(constants.LOG_FILE, "a") as log_file:
93+
with open(constants.LOG_FILE, "a", encoding="utf-8") as log_file:
9494
print(output, file=log_file)
9595

9696
app = self.app

0 commit comments

Comments
 (0)