Skip to content

fix: replace os.uname() with platform.node() for Windows compatibility - #1

Draft
Neon246760 wants to merge 1 commit into
yzp0111:masterfrom
Neon246760:fix/windows-compatibility
Draft

fix: replace os.uname() with platform.node() for Windows compatibility#1
Neon246760 wants to merge 1 commit into
yzp0111:masterfrom
Neon246760:fix/windows-compatibility

Conversation

@Neon246760

Copy link
Copy Markdown

Description

os.uname() is a Unix-only system call. Running structchunk on Windows raises:
AttributeError: module 'os' has no attribute 'uname'

Related Issue

N/A

Type of Change

Please check the relevant options:

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor (no functional change)

Testing

Describe the tests you ran:

  • Added new tests for the change
  • All 192 existing tests still pass (pytest -q)
  • Manually tested the change

Documentation

If this PR changes user-facing behavior:

  • Updated the English canonical docs in README.md or docs/
  • Updated the Chinese mirror in README.zh-CN.md or docs/zh-CN/
  • Ran python scripts/check_doc_sync.py and confirmed 0 discrepancies

Checklist

  • My code follows the project's style (PEP 8, type hints, docstrings)
  • I have run pytest -q and all tests pass
  • I have updated relevant documentation
  • My changes do not introduce new warnings

@Neon246760
Neon246760 requested a review from yzp0111 as a code owner July 30, 2026 00:54
@Neon246760
Neon246760 marked this pull request as draft August 1, 2026 05:19
@Neon246760 Neon246760 changed the title fix:replace os.uname() with platform.node() for Windows compatibility fix: replace os.uname() with platform.node() for Windows compatibility Aug 1, 2026
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.

1 participant