Skip to content

gh-71199: Always build posixmodule as _os - #161915

Open
cmaloney wants to merge 2 commits into
python:mainfrom
cmaloney:gh-71199-build-as-os
Open

cmaloney wants to merge 2 commits into
python:mainfrom
cmaloney:gh-71199-build-as-os

Conversation

@cmaloney

@cmaloney cmaloney commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

The module was compiled as posix or nt depending on the platform. Build it as _os everywhere with a single PyInit__os. Keep the historical names available for compatibility backed by the same init function so sys.builtin_module_names, find_spec() and loading it by hand (as LazyLoader does) keep working.

Freeze skips posix and nt when writing its config.c, since the inittab templates already map them to PyInit__os.

The module was compiled as posix or nt depending on the platform. Build
it as `_os` everywhere with a single `PyInit__os`. Keep the historical
names available for compatibility backed by the same init function so
sys.builtin_module_names, find_spec() and loading it by hand (as
LazyLoader does).

Freeze skips posix and nt when writing its config.c, since the
inittab templates already map them to PyInit__os.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cmaloney cmaloney closed this Nov 12, 2026
@cmaloney cmaloney reopened this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant