You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Export get_platform from the public package surface #44
get_platform() (src/pythonnative/platform.py, line 135) is documented and unit-tested (tests/test_platform.py, lines 26-27), but it isn't re-exported from pythonnative/__init__.py, so pn.get_platform() raises AttributeError. Users have to reach into pythonnative.platform for it, unlike its sibling Platform.
Suggested fix
Import get_platform in src/pythonnative/__init__.py alongside the existing Platform import and add "get_platform" to __all__ (the list starts around line 212).
Every name in __all__ must be covered by the E2E suite or listed in INTENTIONAL_EXEMPTIONS in scripts/check-e2e-coverage.py (line 46). Since get_platform() is a thin functional alias of Platform.OS, add it there with a one-line justification, following the style of the existing entries.
Optionally add a row for it on the Platform page in docs/api/platform.md.
Verification
python scripts/check-e2e-coverage.py exits 0.
A quick unit test that pn.get_platform() == pn.Platform.OS (or extend tests/test_platform.py).
I'd like to take this one. Plan: re-export get_platform in src/pythonnative/init.py and add it to all, add an INTENTIONAL_EXEMPTIONS entry in scripts/check-e2e-coverage.py noting it's a thin alias of Platform.OS, and extend tests/test_platform.py with pn.get_platform() == pn.Platform.OS. Will make sure check-e2e-coverage.py and check.sh pass.
Activity
glenlouis8 commentedon Sep 1, 2026
I'd like to take this one. Plan: re-export get_platform in src/pythonnative/init.py and add it to all, add an INTENTIONAL_EXEMPTIONS entry in scripts/check-e2e-coverage.py noting it's a thin alias of Platform.OS, and extend tests/test_platform.py with pn.get_platform() == pn.Platform.OS. Will make sure check-e2e-coverage.py and check.sh pass.
owenthcarey commentedon Sep 1, 2026
Thank you! Assigned to you.
glenlouis8 commentedon Sep 1, 2026
Opened #48 for this.
feat(package): export get_platform (#48)