Skip to content

fix: avoid subprocess in platform detection - #1763

Open
nightcityblade wants to merge 1 commit into
anthropics:mainfrom
nightcityblade:fix/issue-1762-platform
Open

fix: avoid subprocess in platform detection#1763
nightcityblade wants to merge 1 commit into
anthropics:mainfrom
nightcityblade:fix/issue-1762-platform

Conversation

@nightcityblade

Copy link
Copy Markdown

Fixes #1762

Summary

  • replace platform.platform() with fork-free system(), release(), and machine() lookups
  • preserve macOS, iOS, Android, Linux, and fallback platform classification
  • add regression coverage that fails if platform.platform() is called

Testing

  • uv run pytest tests/test_client.py -n0 -q (185 passed)
  • ./scripts/lint (ruff, pyright, mypy, and import check passed)

@nightcityblade
nightcityblade requested a review from a team as a code owner July 16, 2026 03:23
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.

First API request forks a subprocess via platform.platform() — child segfaults on macOS in long-running processes

1 participant