Skip to content

Commit 8282ff2

Browse files
cmaloneyclaude
andcommitted
gh-71199: Rename posixmodule.c to _osmodule.c
Match the source and its clinic output to the module name. posixmodule.h is a separate shared header and keeps its name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent d96986d commit 8282ff2

18 files changed

Lines changed: 31 additions & 30 deletions

‎Lib/os.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ def _add(str, fn):
213213

214214

215215
# Python uses fixed values for the SEEK_ constants; they are mapped
216-
# to native constants if necessary in posixmodule.c
217-
# Other possible SEEK values are directly imported from posixmodule.c
216+
# to native constants if necessary in _osmodule.c
217+
# Other possible SEEK values are directly imported from _osmodule.c
218218
SEEK_SET = 0
219219
SEEK_CUR = 1
220220
SEEK_END = 2

‎Lib/test/test_ntpath.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,7 @@ def test_con_device(self):
16611661
@unittest.skipIf(sys.platform != 'win32', "Fast paths are only for win32")
16621662
@support.cpython_only
16631663
def test_fast_paths_in_use(self):
1664-
# There are fast paths of these functions implemented in posixmodule.c.
1664+
# There are fast paths of these functions implemented in _osmodule.c.
16651665
# Confirm that they are being used, and not the Python fallbacks in
16661666
# genericpath.py.
16671667
self.assertTrue(os.path.splitroot is nt._path_splitroot_ex)

‎Lib/test/test_os/test_os.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ def test_large_time(self):
13441344

13451345
times = (
13461346
5000000000, # some day in 2128
1347-
# boundaries of the fast path cutoff in posixmodule.c:fill_time
1347+
# boundaries of the fast path cutoff in _osmodule.c:fill_time
13481348
-9223372037, -9223372036, 9223372035, 9223372036,
13491349
)
13501350
for large in times:

‎Lib/test/test_posixpath.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def test_isjunction(self):
290290
@unittest.skipIf(sys.platform == 'win32', "Fast paths are not for win32")
291291
@support.cpython_only
292292
def test_fast_paths_in_use(self):
293-
# There are fast paths of these functions implemented in posixmodule.c.
293+
# There are fast paths of these functions implemented in _osmodule.c.
294294
# Confirm that they are being used, and not the Python fallbacks
295295
self.assertTrue(os.path.splitroot is posix._path_splitroot_ex)
296296
self.assertFalse(inspect.isfunction(os.path.splitroot))

‎Lib/threading.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ def active_count():
16341634
enumerate().
16351635
16361636
"""
1637-
# NOTE: if the logic in here ever changes, update Modules/posixmodule.c
1637+
# NOTE: if the logic in here ever changes, update Modules/_osmodule.c
16381638
# warn_about_fork_with_threads() to match.
16391639
with _active_limbo_lock:
16401640
return len(_active) + len(_limbo)

‎Makefile.pre.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1971,7 +1971,7 @@ Programs/_testembed.o: $(srcdir)/Programs/_testembed.c Programs/test_frozenmain.
19711971

19721972
Modules/_sre/sre.o: $(srcdir)/Modules/_sre/sre.c $(srcdir)/Modules/_sre/sre.h $(srcdir)/Modules/_sre/sre_constants.h $(srcdir)/Modules/_sre/sre_lib.h
19731973

1974-
Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c $(srcdir)/Modules/posixmodule.h
1974+
Modules/_osmodule.o: $(srcdir)/Modules/_osmodule.c $(srcdir)/Modules/posixmodule.h
19751975

19761976
Modules/grpmodule.o: $(srcdir)/Modules/grpmodule.c $(srcdir)/Modules/posixmodule.h
19771977

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``Modules/posixmodule.c`` is renamed to ``Modules/_osmodule.c``.

‎Modules/Setup.bootstrap.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# module C APIs are used in core
99
atexit atexitmodule.c
1010
faulthandler faulthandler.c
11-
_os posixmodule.c
11+
_os _osmodule.c
1212
_signal signalmodule.c
1313
_tracemalloc _tracemalloc.c
1414
_suggestions _suggestions.c
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16805,7 +16805,7 @@ static PyMemberDef DirEntry_members[] = {
1680516805
{NULL}
1680616806
};
1680716807

16808-
#include "clinic/posixmodule.c.h"
16808+
#include "clinic/_osmodule.c.h"
1680916809

1681016810
static PyMethodDef DirEntry_methods[] = {
1681116811
OS_DIRENTRY_IS_DIR_METHODDEF

0 commit comments

Comments
 (0)