From 00a31cc49576260b7381ddd58e9dec85f81457b4 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 26 Aug 2022 11:29:17 +0200 Subject: [PATCH 1/2] gh-84461: Omit resource mod and getresuid funcs on Emscripten --- .../next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst | 3 +++ Tools/wasm/config.site-wasm32-emscripten | 4 ++++ configure | 3 +-- configure.ac | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst diff --git a/Misc/NEWS.d/next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst b/Misc/NEWS.d/next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst new file mode 100644 index 00000000000000..d1bfb98e6e487b --- /dev/null +++ b/Misc/NEWS.d/next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst @@ -0,0 +1,3 @@ +`wasm32-emscripten` platform no longer builds :mod:`resource` module, +:func:`~os.getresuid`, :func:`~os.getresgid`, and their setters. The APIs +are stubs and not functional. diff --git a/Tools/wasm/config.site-wasm32-emscripten b/Tools/wasm/config.site-wasm32-emscripten index a31d60d05dd770..b695a7bf8f04da 100644 --- a/Tools/wasm/config.site-wasm32-emscripten +++ b/Tools/wasm/config.site-wasm32-emscripten @@ -49,6 +49,10 @@ ac_cv_func_geteuid=no ac_cv_func_getegid=no ac_cv_func_seteuid=no ac_cv_func_setegid=no +ac_cv_func_getresuid=no +ac_cv_func_getresgid=no +ac_cv_func_setresuid=no +ac_cv_func_setresgid=no # Syscalls not implemented in emscripten # [Errno 52] Function not implemented diff --git a/configure b/configure index 1801f806ae137f..758806a6c6fb11 100755 --- a/configure +++ b/configure @@ -25544,6 +25544,7 @@ case $ac_sys_system in #( py_cv_module_nis=n/a py_cv_module_ossaudiodev=n/a py_cv_module_pwd=n/a + py_cv_module_resource=n/a py_cv_module_spwd=n/a py_cv_module_syslog=n/a py_cv_module_=n/a @@ -25554,7 +25555,6 @@ case $ac_sys_system in #( py_cv_module_fcntl=n/a - py_cv_module_resource=n/a py_cv_module_readline=n/a py_cv_module_termios=n/a py_cv_module_=n/a @@ -25569,7 +25569,6 @@ case $ac_sys_system in #( py_cv_module__ctypes_test=n/a py_cv_module_fcntl=n/a py_cv_module_mmap=n/a - py_cv_module_resource=n/a py_cv_module_termios=n/a py_cv_module_=n/a diff --git a/configure.ac b/configure.ac index bb9fec07242f8e..9ba5553cf7d0da 100644 --- a/configure.ac +++ b/configure.ac @@ -7048,6 +7048,7 @@ AS_CASE([$ac_sys_system], dnl curses and tkinter user interface are not available. dnl dbm and gdbm aren't available, too. dnl Emscripten and WASI provide only stubs for pwd, grp APIs. + dnl resource functions (get/setrusage) are stubs, too. PY_STDLIB_MOD_SET_NA( [_curses], [_curses_panel], @@ -7063,6 +7064,7 @@ AS_CASE([$ac_sys_system], [nis], [ossaudiodev], [pwd], + [resource], [spwd], [syslog], ) @@ -7071,7 +7073,6 @@ AS_CASE([$ac_sys_system], dnl These modules are not particularly useful in browsers. PY_STDLIB_MOD_SET_NA( [fcntl], - [resource], [readline], [termios], ) @@ -7083,7 +7084,6 @@ AS_CASE([$ac_sys_system], [_ctypes_test], [fcntl], [mmap], - [resource], [termios], ) ] From 0006ef71bfc5b96aba9828a80fdb567b1d1f95ee Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Fri, 26 Aug 2022 12:35:58 +0200 Subject: [PATCH 2/2] markup --- .../next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst b/Misc/NEWS.d/next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst index d1bfb98e6e487b..134e9645159a69 100644 --- a/Misc/NEWS.d/next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst +++ b/Misc/NEWS.d/next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst @@ -1,3 +1,3 @@ -`wasm32-emscripten` platform no longer builds :mod:`resource` module, +``wasm32-emscripten`` platform no longer builds :mod:`resource` module, :func:`~os.getresuid`, :func:`~os.getresgid`, and their setters. The APIs are stubs and not functional.