Skip to content

Commit 00a31cc

Browse files
committed
pythongh-84461: Omit resource mod and getresuid funcs on Emscripten
1 parent 0319cd6 commit 00a31cc

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
`wasm32-emscripten` platform no longer builds :mod:`resource` module,
2+
:func:`~os.getresuid`, :func:`~os.getresgid`, and their setters. The APIs
3+
are stubs and not functional.

Tools/wasm/config.site-wasm32-emscripten

+4
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ ac_cv_func_geteuid=no
4949
ac_cv_func_getegid=no
5050
ac_cv_func_seteuid=no
5151
ac_cv_func_setegid=no
52+
ac_cv_func_getresuid=no
53+
ac_cv_func_getresgid=no
54+
ac_cv_func_setresuid=no
55+
ac_cv_func_setresgid=no
5256

5357
# Syscalls not implemented in emscripten
5458
# [Errno 52] Function not implemented

configure

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+2-2
Original file line numberDiff line numberDiff line change
@@ -7048,6 +7048,7 @@ AS_CASE([$ac_sys_system],
70487048
dnl curses and tkinter user interface are not available.
70497049
dnl dbm and gdbm aren't available, too.
70507050
dnl Emscripten and WASI provide only stubs for pwd, grp APIs.
7051+
dnl resource functions (get/setrusage) are stubs, too.
70517052
PY_STDLIB_MOD_SET_NA(
70527053
[_curses],
70537054
[_curses_panel],
@@ -7063,6 +7064,7 @@ AS_CASE([$ac_sys_system],
70637064
[nis],
70647065
[ossaudiodev],
70657066
[pwd],
7067+
[resource],
70667068
[spwd],
70677069
[syslog],
70687070
)
@@ -7071,7 +7073,6 @@ AS_CASE([$ac_sys_system],
70717073
dnl These modules are not particularly useful in browsers.
70727074
PY_STDLIB_MOD_SET_NA(
70737075
[fcntl],
7074-
[resource],
70757076
[readline],
70767077
[termios],
70777078
)
@@ -7083,7 +7084,6 @@ AS_CASE([$ac_sys_system],
70837084
[_ctypes_test],
70847085
[fcntl],
70857086
[mmap],
7086-
[resource],
70877087
[termios],
70887088
)
70897089
]

0 commit comments

Comments
 (0)