]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-84461: Omit resource mod and getresuid funcs on Emscripten (GH-96303)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 13 Sep 2022 10:08:12 +0000 (03:08 -0700)
committerGitHub <noreply@github.com>
Tue, 13 Sep 2022 10:08:12 +0000 (03:08 -0700)
(cherry picked from commit a36235d5c7863a85fa323b2048d3d254116a958e)

Co-authored-by: Christian Heimes <christian@python.org>
Misc/NEWS.d/next/Build/2022-08-26-11-09-11.gh-issue-84461.Nsdn_R.rst [new file with mode: 0644]
Tools/wasm/config.site-wasm32-emscripten
configure
configure.ac

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 (file)
index 0000000..134e964
--- /dev/null
@@ -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.
index a31d60d05dd770edccb2169ddffbee2d994d0005..b695a7bf8f04dad8f054195d565c0ef404121e7a 100644 (file)
@@ -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
index 2d03c4fb5a61ca322184446109e3655d8b478406..083ee0e5906743dd8eae7656d5229b35c7689568 100755 (executable)
--- a/configure
+++ b/configure
@@ -23532,6 +23532,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
@@ -23542,7 +23543,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
@@ -23557,7 +23557,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
 
index 1d7e1be5e3b08b0cc8f372db15a9a7bb6f1ecec1..d9a6f686b59ebaed5ab8bfb75bfd599282c79081 100644 (file)
@@ -6832,6 +6832,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],
@@ -6847,6 +6848,7 @@ AS_CASE([$ac_sys_system],
       [nis],
       [ossaudiodev],
       [pwd],
+      [resource],
       [spwd],
       [syslog],
     )
@@ -6855,7 +6857,6 @@ AS_CASE([$ac_sys_system],
         dnl These modules are not particularly useful in browsers.
         PY_STDLIB_MOD_SET_NA(
           [fcntl],
-          [resource],
           [readline],
           [termios],
         )
@@ -6867,7 +6868,6 @@ AS_CASE([$ac_sys_system],
           [_ctypes_test],
           [fcntl],
           [mmap],
-          [resource],
           [termios],
         )
       ]