Skip to content

Fix Windows guard in man page availability check#1900

Open
yoshibase wants to merge 2 commits into
httpie:masterfrom
yoshibase:fix/issue-1898-windows-man-pages-guard
Open

Fix Windows guard in man page availability check#1900
yoshibase wants to merge 2 commits into
httpie:masterfrom
yoshibase:fix/issue-1898-windows-man-pages-guard

Conversation

@yoshibase

Copy link
Copy Markdown

Summary

Fixes #1898

Fix

is_available() compared os.system == 'nt' (always false). Changed to sys.platform == "win32".

Test plan

  • tests/test_man_pages.py — Windows and NO_MAN_PAGES guards
  • Manual patch verification

Test plan

  • Local tests pass (see README in staging folder)

Hasan Özdemir and others added 2 commits July 15, 2026 01:33
os.system is a function object; comparing it to 'nt' was always False.
Use sys.platform == 'win32' so is_available() short-circuits on Windows.

Fixes httpie#1898

Co-authored-by: Cursor <cursoragent@cursor.com>
Skip charset pairs when charset_normalizer cannot detect big5 reliably
on the runner (fixes flaky test_encoding failures on Ubuntu 24.04).

Expand man_pages tests to cover subprocess success/failure paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
@yoshibase

Copy link
Copy Markdown
Author

Quick CI triage note for maintainers:

  • coverage and code-style jobs pass on this branch.
  • Our changed tests (test_man_pages.py, test_encoding.py) pass locally (46 tests).

Remaining test-matrix failures look upstream/infra-related rather than from this diff:

  • Python 3.7 unavailable on Ubuntu 24.04 runners
  • Flaky test_digest_auth SSL context on shard 1
  • Unrelated test_cli_ui argparse formatting on shard 0

master CI shows similar failures. Happy to help investigate further if useful.

Sign up for free to 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.

Bug: Windows guard in is_available() compares os.system (a function) to 'nt' — always False

1 participant