[Python-checkins] bpo-40280: Enable most file-at() and nanosleep APIs again (GH-32238)
tiran
webhook-mailer at python.org
Sat Apr 2 04:13:55 EDT 2022
https://github.com/python/cpython/commit/4ed8a9a589d2eee7442e0c9417515a707e504faa
commit: 4ed8a9a589d2eee7442e0c9417515a707e504faa
branch: main
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2022-04-02T10:13:44+02:00
summary:
bpo-40280: Enable most file-at() and nanosleep APIs again (GH-32238)
files:
M Lib/test/test_os.py
M Tools/wasm/config.site-wasm32-emscripten
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 9a60bf5f7fdd5..5f73af81d4560 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -1334,7 +1334,9 @@ def setUp(self):
else:
self.sub2_tree = (sub2_path, ["SUB21"], ["tmp3"])
- os.chmod(sub21_path, 0)
+ if not support.is_emscripten:
+ # Emscripten fails with inaccessible directory
+ os.chmod(sub21_path, 0)
try:
os.listdir(sub21_path)
except PermissionError:
@@ -1517,6 +1519,9 @@ def test_yields_correct_dir_fd(self):
# check that listdir() returns consistent information
self.assertEqual(set(os.listdir(rootfd)), set(dirs) | set(files))
+ @unittest.skipIf(
+ support.is_emscripten, "Cannot dup stdout on Emscripten"
+ )
def test_fd_leak(self):
# Since we're opening a lot of FDs, we must be careful to avoid leaks:
# we both check that calling fwalk() a large number of times doesn't
@@ -2935,6 +2940,9 @@ def test_bad_fd(self):
@unittest.skipUnless(os.isatty(0) and not win32_is_iot() and (sys.platform.startswith('win') or
(hasattr(locale, 'nl_langinfo') and hasattr(locale, 'CODESET'))),
'test requires a tty and either Windows or nl_langinfo(CODESET)')
+ @unittest.skipIf(
+ support.is_emscripten, "Cannot get encoding of stdin on Emscripten"
+ )
def test_device_encoding(self):
encoding = os.device_encoding(0)
self.assertIsNotNone(encoding)
diff --git a/Tools/wasm/config.site-wasm32-emscripten b/Tools/wasm/config.site-wasm32-emscripten
index 7f2df3a47723f..60ede49eb3745 100644
--- a/Tools/wasm/config.site-wasm32-emscripten
+++ b/Tools/wasm/config.site-wasm32-emscripten
@@ -27,11 +27,6 @@ ac_cv_func_prlimit=no
# unsupported syscall, https://github.com/emscripten-core/emscripten/issues/13393
ac_cv_func_shutdown=no
-# clock_nanosleep() causes time.sleep() to sleep forever.
-# nanosleep() works correctly
-ac_cv_func_clock_nanosleep=no
-ac_cv_lib_rt_clock_nanosleep=no
-
# The rest is based on pyodide
# https://github.com/pyodide/pyodide/blob/main/cpython/pyconfig.undefs.h
@@ -39,20 +34,11 @@ ac_cv_func_epoll_create=no
ac_cv_func_epoll_create1=no
ac_cv_header_linux_vm_sockets_h=no
ac_cv_func_socketpair=no
-ac_cv_func_utimensat=no
ac_cv_func_sigaction=no
-# Untested or failing syscalls in emscripten
-ac_cv_func_openat=no
-ac_cv_func_mkdirat=no
-ac_cv_func_faccessat=no
-ac_cv_func_fchownat=no
-ac_cv_func_renameat=no
-ac_cv_func_linkat=no
+# symlinkat is implemented, but fails
ac_cv_func_symlinkat=no
-ac_cv_func_readlinkat=no
-ac_cv_func_fchmodat=no
-ac_cv_func_dup3=no
+
# lchmod/lchown are implemented, but fail with ENOTSUP.
ac_cv_func_lchmod=no
ac_cv_func_lchown=no
More information about the Python-checkins
mailing list