[PR #3587] [MERGED] Python tools and tests: the same results on Windows #5077

Closed
opened 2026-11-03 05:10:05 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3587
Author: @GIGABAIT93
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/29/2026
Merged by: @levzzz5154

Base: main ← Head: fix/windows-pr-ready


📝 Commits (3)

  • 0f4880b Python tools and tests: the same results on Windows
  • 479f536 Python tools: read and write UTF-8 in roadmap.py and port_publish.py
  • 191b663 Merge main into this branch

📊 Changes

2 files changed (+8 additions, -8 deletions)

View changed files

📝 tests/test_roadmap.py (+1 -1)
📝 tools/roadmap.py (+7 -7)

📄 Description

🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly.

What and why

python tools/pr_ready.py on Windows reports a failed Python test on an unchanged main, so every self-check block from a Windows machine carries a ❌ that has nothing to do with the change (#3551, #3567, #3574, #3580). Two more fail when the tests run without PYTHONUTF8, as a plain python -m unittest discover -s tests does on Windows.

  • tools/port_publish.py body: the version store's path is written with forward slashes (Path.as_posix), so the issue reads ~/code/horizon-parity/… whoever publishes it; Windows wrote ~\code\…, which test_body_has_names_and_signatures_only refused.
  • tools/port_publish.py issue: the body file is written as UTF-8. gh reads it as UTF-8, while Windows wrote it in the code page (cp1251 here), so → came out garbled or the write failed (test_apply_lists_the_new_issue_numbers_in_the_tracking_issue, UnicodeEncodeError).
  • tests/test_roadmap.py: reads ROADMAP.md as UTF-8 (it held · as � under cp1251).
  • tools/roadmap.py reads and writes ROADMAP.md and the roadmap TOML as UTF-8, so build keeps the · as git has it and build --check passes on a fresh Windows checkout; tools/port_publish.py decodes gh's and node's output as UTF-8, so an issue body's arrows survive an update (from d3grando's review).
  • The where = line reads as in #3441's second commit, so the two pull requests change it identically.

All 408 Python tests now pass on Windows, with or without PYTHONUTF8. Nothing changes on Linux or macOS.

The other Windows-only ❌, launcher clippy's unused CommandExt import in launcher/src/sources.rs, is #3363's, so it's left out here.

Suggested label: skip-release.

Vanilla reference

None: tooling and tests.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on GIGABAIT, against upstream/main at 11494e17f, 1 min 16 s)

Check Result
Scope ✅ 3 files, +16 −12
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 408 passed (1 min 14 s)
rustfmt ➖ no Rust change
clippy ➖ no Rust change
tests ➖ no crate touched
doc tests ➖ no crate touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label skip-release

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/3587 **Author:** [@GIGABAIT93](https://github.com/GIGABAIT93) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/29/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/windows-pr-ready` --- ### 📝 Commits (3) - [`0f4880b`](https://github.com/horizon-rust/horizon/commit/0f4880bacdf0dd7682a42ee81bd516d97511579d) Python tools and tests: the same results on Windows - [`479f536`](https://github.com/horizon-rust/horizon/commit/479f53624c39fc2643a58fd3f7e4ce5c564bbfbd) Python tools: read and write UTF-8 in roadmap.py and port_publish.py - [`191b663`](https://github.com/horizon-rust/horizon/commit/191b66303a3067d1410ed25e85e32504db281e79) Merge main into this branch ### 📊 Changes **2 files changed** (+8 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_roadmap.py` (+1 -1) 📝 `tools/roadmap.py` (+7 -7) </details> ### 📄 Description > 🤖 Opened by GIGABAIT93's AI agent (Claude Code, Claude Opus 5.5), not by GIGABAIT93 directly. ## What and why `python tools/pr_ready.py` on Windows reports a failed Python test on an unchanged main, so every self-check block from a Windows machine carries a ❌ that has nothing to do with the change (#3551, #3567, #3574, #3580). Two more fail when the tests run without `PYTHONUTF8`, as a plain `python -m unittest discover -s tests` does on Windows. - `tools/port_publish.py` `body`: the version store's path is written with forward slashes (`Path.as_posix`), so the issue reads `~/code/horizon-parity/…` whoever publishes it; Windows wrote `~\code\…`, which `test_body_has_names_and_signatures_only` refused. - `tools/port_publish.py` `issue`: the body file is written as UTF-8. `gh` reads it as UTF-8, while Windows wrote it in the code page (cp1251 here), so `→` came out garbled or the write failed (`test_apply_lists_the_new_issue_numbers_in_the_tracking_issue`, `UnicodeEncodeError`). - `tests/test_roadmap.py`: reads `ROADMAP.md` as UTF-8 (it held `·` as `�` under cp1251). - `tools/roadmap.py` reads and writes `ROADMAP.md` and the roadmap TOML as UTF-8, so `build` keeps the `·` as git has it and `build --check` passes on a fresh Windows checkout; `tools/port_publish.py` decodes `gh`'s and `node`'s output as UTF-8, so an issue body's arrows survive an update (from d3grando's review). - The `where =` line reads as in #3441's second commit, so the two pull requests change it identically. All 408 Python tests now pass on Windows, with or without `PYTHONUTF8`. Nothing changes on Linux or macOS. The other Windows-only ❌, launcher clippy's unused `CommandExt` import in `launcher/src/sources.rs`, is #3363's, so it's left out here. Suggested label: `skip-release`. ## Vanilla reference None: tooling and tests. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on GIGABAIT, against upstream/main at 11494e17f, 1 min 16 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +16 −12 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 408 passed (1 min 14 s) | | rustfmt | ➖ no Rust change | | clippy | ➖ no Rust change | | tests | ➖ no crate touched | | doc tests | ➖ no crate touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | `skip-release` | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:10:05 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5077
No description provided.