Open log file with utf-8 encoding.

Updated pycln version due to this issue: https://github.com/hadialqattan/pycln/issues/249
This commit is contained in:
Levon Haykazyan
2025-07-09 14:00:30 +01:00
parent 3339d67dc1
commit bc20ed5779
3 changed files with 8 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ repos:
hooks: hooks:
- id: black - id: black
- repo: https://github.com/hadialqattan/pycln # removes unused imports - repo: https://github.com/hadialqattan/pycln # removes unused imports
rev: v2.3.0 rev: v2.5.0
hooks: hooks:
- id: pycln - id: pycln
language_version: '3.11' language_version: '3.11'

View File

@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/). and this project adheres to [Semantic Versioning](http://semver.org/).
## Unreleased
### Fixed
- Fixed logging to a file on Windows https://github.com/Textualize/textual/issues/5941
## [3.7.1] - 2025-07-09 ## [3.7.1] - 2025-07-09
### Fixed ### Fixed

View File

@@ -90,7 +90,7 @@ class Logger:
) )
output = f"{output} {key_values}" if output else key_values output = f"{output} {key_values}" if output else key_values
with open(constants.LOG_FILE, "a") as log_file: with open(constants.LOG_FILE, "a", encoding="utf-8") as log_file:
print(output, file=log_file) print(output, file=log_file)
app = self.app app = self.app