Repository navigation
Conversation
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 <[email protected]>
Documentation build overview
11 files changed ·
|
| .m_name = MODNAME, | ||
| .m_name = "os", | ||
| .m_doc = posix__doc__, | ||
| .m_size = sizeof(_posixstate), |
There was a problem hiding this comment.
note: the .m_methods moves to the PyModule_AddFunctions in posixmodule_exec
|
buildbot failures unrelated to this change. @StanFromIreland this is ready for you to take a look. This does the module rename from |
Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Cody Maloney <[email protected]>
So |
_os
StanFromIreland
left a comment
There was a problem hiding this comment.
This looks good to me, I suggest waiting a few days before landing this in case others have thoughts.
CC @vstinner you may be interested.
Fairly straightforward to keep the old names if want to consider those to be part of the API. I was leaning the rename may break some embedding, and eliminating all the unnecessary conditional code is worthwhile to simplify here. Better to have one break ( If we rename |
|
"posix" and "nt" names are used/visible in many places. I would prefer to not have a single PR changing everything at once. This PR changes posixmodule.c module name to We have a similar separation between |
|
Re: My bias here comes from |
|
@vstinner any further preference here? The |
The module was compiled as posix or nt depending on the platform. Build it as
_oseverywhere with a singlePyInit__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.