Fix Windows man pages guard: os.system to sys.platform - #1908
Open
adnanahamed66772ndpc wants to merge 11 commits into
Open
Fix Windows man pages guard: os.system to sys.platform#1908adnanahamed66772ndpc wants to merge 11 commits into
adnanahamed66772ndpc wants to merge 11 commits into
Conversation
added 2 commits
July 25, 2026 22:45
os.system is a function object, comparing it to 'nt' always returns False. Changed to sys.platform == 'win32' for correct Windows detection. Closes httpie#1898, httpie#1903
adnanahamed66772ndpc
force-pushed
the
fix-windows-guard
branch
from
September 1, 2026 06:33
996848d to
6bbe241
Compare
adnanahamed66772ndpc
force-pushed
the
fix-windows-guard
branch
from
September 1, 2026 06:35
6bbe241 to
bf7a84d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1898, #1903
Description
This PR resolves an issue with the Windows man pages availability check. Previously,
os.system(a function object) was being compared directly to the string'nt', which always evaluated toFalseand failed to act as a proper Windows guard. This has been corrected to safely usesys.platform == 'win32'alongside the requiredimport sys.CI Maintenance & Flaky Test Fixes
While validating my changes, I noticed several tests were failing globally across
masterdue to upstream dependency updates and recent system environment changes in GitHub Actions. To ensure the PR passes properly and to help keep the repository healthy, I spent some time investigating and bundled the following CI maintenance fixes:test_cli_ui.pythat were breaking strictly on Python 3.12 due to standard libraryargparseformatting updates (single quotes are now stripped).ubuntu-22.04instead ofubuntu-latestintests.ymlso that Python 3.7 jobs can continue running, assetup-pythonon Ubuntu 24.04 drops pre-built binaries for 3.7.test_basic_authviahttpsto safely handle and preventpytest-httpbinrandom socket drops (WSAECONNABORTED) on Windows runners.test_plugins_cli.pythat test dummy legacy package generation, as they are completely broken by default when compiled and isolated using the newestpip(>=24) andsetuptoolsbuild isolation configurations.ValueErrorexceptions caused by recent<24.0.0library compat issues.All checks are finally completely green. Let me know if any tweaks are needed!