mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[PR #367] pr_conflict_label: guard stdout against the console code page (TEST-WIN-SWEEP) #419
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#419
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/367
Author: @ItsMrDubey
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:win-stdout-pr-conflict-label📝 Commits (1)
9683501pr_conflict_label: stdout writes '?' for what the console code page cannot encode, as every other tool does📊 Changes
1 file changed (+4 additions, -0 deletions)
View changed files
📝
tools/pr_conflict_label.py(+4 -0)📄 Description
Claimed in the coordination issue as: TEST-WIN-SWEEP (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7121328982)
What and why
python -I tests/test_tool_stdout_encoding.pyfails on main:test_every_main_block_reconfigures_stdoutliststools/pr_conflict_label.py, added in4f7a347(PR-CONFLICT-LABEL) without thesys.stdout.reconfigure(errors="replace")guard every other program's__main__block has. Under-Ia redirected stdout on Windows is strict cp1252, so a character outside the code page would end the run withUnicodeEncodeError. The check itself is not Windows-specific, so the test fails on every OS; the sweep found it on Windows.The
__main__block now sets the same guard, in the same words, asscripts/ci_expected_failures.pyand the tools.Tested
Windows 11, Python 3.11.9 and 3.12.9:
python -I tests/test_tool_stdout_encoding.py: beforeFAIL ... ['tools/pr_conflict_label.py'] != [](exit 1); after OK.python -I tests/test_pr_conflict_label.py: OK.python -I scripts/check_no_game_data.py tools/pr_conflict_label.py: clean.python3 -I tools/pr_conflict_label.py):reconfigureis a no-op there for a UTF-8 stdout and the guard swallows the errors it could raise.AI-assisted: yes
Checklist
docs/design.md, with how it was confirmed. n/a: no translator rule🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.