Skip to content

Restore runs-on: windows-latest - #5835

Merged
rwgk merged 3 commits into
pybind:masterfrom
rwgk:restore-runs-on-windows-latest
Sep 13, 2025
Merged

Restore runs-on: windows-latest#5835
rwgk merged 3 commits into
pybind:masterfrom
rwgk:restore-runs-on-windows-latest

Conversation

@rwgk

@rwgkrwgk commented Sep 12, 2025

Copy link
Copy Markdown
Collaborator

Description

  1. Revert PR s/windows-latest/windows-2022/ in .github/workflows/{ci,pip}.yml #5826
  2. Add module-level skip for Windows build >= 26100 in test_iostream.py

Suggested changelog entry:

  • Placeholder.

@rwgkrwgk changed the title Restore runs-on: windows latestRestore runs-on: windows-latestSep 12, 2025
@rwgk
rwgk marked this pull request as ready for review September 12, 2025 22:54
@rwgk
rwgk requested a review from henryiii as a code ownerSeptember 12, 2025 22:54
@henryiii

Copy link
Copy Markdown
Collaborator

Not following closely, do we know why we have to skip for builds of windows above that value?

@rwgk

rwgk commented Sep 12, 2025

Copy link
Copy Markdown
CollaboratorAuthor

Not following closely, do we know why we have to skip for builds of windows above that value?

Sorry I don't, at all. I hope someone else will pick this up.

I stumbled over this while working on #5796 (comment)

When I saw the test_iostream.py failures on my workstation, I was guessing they might be identical to what we saw in the CI with windows-latest aka windows-2025. Then I asked ChatGPT how we could detect windows-2025 or Windows 11 24H2 (my workstation), and it instantly gave me the Windows build number to look for.

Bottom line: This PR doesn't fix anything, but

  • it narrows down where the problem is,
  • allows us to continue using windows-latest in the CI for everything else, and
  • eliminates the distracting errors when running the unit tests locally on my workstation.

Comment threadtests/test_iostream.py Outdated

from pybind11_tests import iostream as m

if sys.platform == "win32":

@henryiiihenryiiiSep 13, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ifsys.platform=="win32":
ifsys.platform.startswith("win32"):

It's canonical to use startswith when checking sys.platform, though it's often not required.

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this with a fresh eye: For a moment I forgot that we have env.WIN. Changed to use that: commit 8b79a85

Comment threadtests/test_iostream.py Outdated
if wv_build >= skip_if_ge:
pytest.skip(
f"Windows build {wv_build} >= {skip_if_ge}:"
" Skipping iostream capture (redirection regression under investigation)",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
" Skipping iostream capture (redirection regression under investigation)",
" Skipping iostream capture (redirection regression needs investigation)",

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: commit 8b79a85

@rwgk

rwgk commented Sep 13, 2025

Copy link
Copy Markdown
CollaboratorAuthor

Thanks @henryiii!

@rwgk
rwgk merged commit d4d555d into pybind:masterSep 13, 2025
85 checks passed
@rwgk
rwgk deleted the restore-runs-on-windows-latest branch September 13, 2025 04:52
@github-actionsgithub-actionsBot added the needs changelog Possibly needs a changelog entry label Sep 13, 2025
@rwgkrwgk removed the needs changelog Possibly needs a changelog entry label Jan 21, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@rwgk@henryiii