Skip to content

Commit 8238fa9

Browse files
gh-84461: Omit resource mod and getresuid funcs on Emscripten (GH-96303)
(cherry picked from commit a36235d) Co-authored-by: Christian Heimes <[email protected]>
1 parent 4958820 commit 8238fa9

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
@@ -6832,6 +6832,7 @@ AS_CASE([$ac_sys_system],
68326832
dnl curses and tkinter user interface are not available.
68336833
dnl dbm and gdbm aren't available, too.
68346834
dnl Emscripten and WASI provide only stubs for pwd, grp APIs.
6835+
dnl resource functions (get/setrusage) are stubs, too.
68356836
PY_STDLIB_MOD_SET_NA(
68366837
[_curses],
68376838
[_curses_panel],
@@ -6847,6 +6848,7 @@ AS_CASE([$ac_sys_system],
68476848
[nis],
68486849
[ossaudiodev],
68496850
[pwd],
6851+
[resource],
68506852
[spwd],
68516853
[syslog],
68526854
)
@@ -6855,7 +6857,6 @@ AS_CASE([$ac_sys_system],
68556857
dnl These modules are not particularly useful in browsers.
68566858
PY_STDLIB_MOD_SET_NA(
68576859
[fcntl],
6858-
[resource],
68596860
[readline],
68606861
[termios],
68616862
)
@@ -6867,7 +6868,6 @@ AS_CASE([$ac_sys_system],
68676868
[_ctypes_test],
68686869
[fcntl],
68696870
[mmap],
6870-
[resource],
68716871
[termios],
68726872
)
68736873
]

0 commit comments

Comments
 (0)