From fc2978dd03dce5051a3471c72d24de4779459f81 Mon Sep 17 00:00:00 2001 From: greenwyrt <117969582+greenwyrt@users.noreply.github.com> Date: Sun, 29 Mar 2026 13:23:53 -0700 Subject: [PATCH 1/2] correct encoding on windows system i18n test was failing on windows because generated *_ui.py files from pyside6-uic were not utf-8. --- plover_build_utils/setup.py | 9 +++++++-- pyproject.toml | 2 +- reqs/constraints.txt | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/plover_build_utils/setup.py b/plover_build_utils/setup.py index 0c9d3660c..3db443578 100644 --- a/plover_build_utils/setup.py +++ b/plover_build_utils/setup.py @@ -112,14 +112,19 @@ def _build_ui(self, src): subprocess.check_call(["pyside6-uic", "--from-imports", src, "-o", dst]) + if sys.platform.startswith("win32"): + platform_encoding = "cp1252" + else: + platform_encoding = "utf-8" + for hook in self.hooks: mod_name, attr_name = hook.split(":") mod = importlib.import_module(mod_name) hook_fn = getattr(mod, attr_name) - with open(dst, "r") as fp: + with open(dst, "r", encoding=platform_encoding) as fp: contents = fp.read() contents = hook_fn(contents) - with open(dst, "w") as fp: + with open(dst, "w", encoding="utf-8") as fp: fp.write(contents) def _build_resources(self, src): diff --git a/pyproject.toml b/pyproject.toml index ccbf3557c..97fc3a5c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "babel", - "PySide6>=6.9.0", + "PySide6>=6.10.0", "setuptools>=79.0.0", "wheel", ] diff --git a/reqs/constraints.txt b/reqs/constraints.txt index a73ef9eb4..8274df312 100644 --- a/reqs/constraints.txt +++ b/reqs/constraints.txt @@ -45,8 +45,8 @@ pyobjc-core==11.0 pyobjc-framework-Cocoa==11.0 pyobjc-framework-Quartz==11.0 pyparsing==3.2.3 -PySide6==6.9.0 -PySide6-Essentials==6.9.0 +PySide6==6.11.0 +PySide6-Essentials==6.11.0 pyserial==3.5 pytest==8.3.5 pytest-qt==4.4.0 From d09ac51e5f23d6418797e284fdc764a5073d8cf6 Mon Sep 17 00:00:00 2001 From: Martin Koerner Date: Thu, 9 Apr 2026 06:58:25 +0200 Subject: [PATCH 2/2] Revert changes to PySide6 version --- pyproject.toml | 2 +- reqs/constraints.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 97fc3a5c9..ccbf3557c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "babel", - "PySide6>=6.10.0", + "PySide6>=6.9.0", "setuptools>=79.0.0", "wheel", ] diff --git a/reqs/constraints.txt b/reqs/constraints.txt index 8274df312..a73ef9eb4 100644 --- a/reqs/constraints.txt +++ b/reqs/constraints.txt @@ -45,8 +45,8 @@ pyobjc-core==11.0 pyobjc-framework-Cocoa==11.0 pyobjc-framework-Quartz==11.0 pyparsing==3.2.3 -PySide6==6.11.0 -PySide6-Essentials==6.11.0 +PySide6==6.9.0 +PySide6-Essentials==6.9.0 pyserial==3.5 pytest==8.3.5 pytest-qt==4.4.0