native_pso_hashes: guard stdout like every other tool #948

Manually merged
github merged 1 commit from gh-pr/948/head into gh-pr/948/base 2026-11-26 09:29:58 +00:00
Owner

@⁠barkodr on GitHub · 2026-11-24 15:37 UTC · original
barkodr:fix/native-pso-stdout → main · +4 −0 · 1 files · 1 commits · merged 2026-11-24 17:05 UTC

Claimed in the coordination issue as: claiming: tools/native_pso_hashes.py has no stdout errors="replace" guard (added in 62a9588), so test_tool_stdout_encoding fails on main. Tools only. AI-assisted.

What and why

tools/native_pso_hashes.py was the only tool whose __main__ block did not set errors="replace" on stdout, so tests/test_tool_stdout_encoding.py failed on main. It now starts its __main__ block with the same guard as the other tools. Bram's 116de82f6 already fixed --help, so this pull request is only the stdout guard.

Tested

On macOS 26.6.2 with Python 3.12.16 and on Ubuntu 26.04 (WSL2) with Python 3.14.4, from the checkout root with python -I: tests/test_native_pso_hashes.py, tests/test_tool_stdout_encoding.py, tests/test_tool_startup.py, tests/test_text_write_line_endings.py and tests/test_docs_python_deps.py all pass on both. test_tool_stdout_encoding.py fails on main with only tools/native_pso_hashes.py listed and passes on this branch.

GPUs tested: none (no GPU code changed)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
**@⁠barkodr** on GitHub · 2026-11-24 15:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/948) `barkodr:fix/native-pso-stdout` → `main` · +4 −0 · 1 files · 1 commits · merged 2026-11-24 17:05 UTC Claimed in the coordination issue as: claiming: tools/native_pso_hashes.py has no stdout errors="replace" guard (added in 62a9588), so test_tool_stdout_encoding fails on main. Tools only. AI-assisted. ### What and why `tools/native_pso_hashes.py` was the only tool whose `__main__` block did not set `errors="replace"` on stdout, so `tests/test_tool_stdout_encoding.py` failed on `main`. It now starts its `__main__` block with the same guard as the other tools. Bram's 116de82f6 already fixed `--help`, so this pull request is only the stdout guard. ### Tested On macOS 26.6.2 with Python 3.12.16 and on Ubuntu 26.04 (WSL2) with Python 3.14.4, from the checkout root with `python -I`: `tests/test_native_pso_hashes.py`, `tests/test_tool_stdout_encoding.py`, `tests/test_tool_startup.py`, `tests/test_text_write_line_endings.py` and `tests/test_docs_python_deps.py` all pass on both. `test_tool_stdout_encoding.py` fails on `main` with only `tools/native_pso_hashes.py` listed and passes on this branch. GPUs tested: none (no GPU code changed) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:29:56 +00:00
github manually merged commit 58263f612c into gh-pr/948/base 2026-11-26 09:29:58 +00:00
Author
Owner

@⁠Poussistar on GitHub · 2026-11-24 15:58 UTC · original

Independent check on Linux (4 vCPU, CPython 3.14.7): the diff applied to a clean worktree at main a28927849.

  • without the diff, python -I tests/test_tool_stdout_encoding.py → First extra element 0: 'tools/native_pso_hashes.py', Ran 4 tests … FAILED (failures=1)
  • with the diff, the same command → Ran 4 tests in 0.341s … OK

tools/native_pso_hashes.py is the only program that guard still lists, so this pull request turns that repository-wide red green. tests/test_native_pso_hashes.py and tests/test_text_write_line_endings.py also pass at this head. No game files, no GPU needed.

**@⁠Poussistar** on GitHub · 2026-11-24 15:58 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/948#issuecomment-7136929738) Independent check on Linux (4 vCPU, CPython 3.14.7): the diff applied to a clean worktree at `main` `a28927849`. - without the diff, `python -I tests/test_tool_stdout_encoding.py` → `First extra element 0: 'tools/native_pso_hashes.py'`, `Ran 4 tests … FAILED (failures=1)` - with the diff, the same command → `Ran 4 tests in 0.341s … OK` `tools/native_pso_hashes.py` is the only program that guard still lists, so this pull request turns that repository-wide red green. `tests/test_native_pso_hashes.py` and `tests/test_text_write_line_endings.py` also pass at this head. No game files, no GPU needed.
This discussion has been locked. Commenting is limited to contributors.
No description provided.