You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emscripten: Remove obsolete pthread_getattr_np workaround in ceval.c #160873
The workaround in Python/ceval.c was introduced to address a broken pthread_getattr_np() implementation in Emscripten versions prior to 4.0.6 (GH-130396, #131088).
The existing comment explicitly describes it as temporary:
#if defined(__EMSCRIPTEN__)
// Temporary workaround to make `pthread_getattr_np` work on Emscripten.// Emscripten 4.0.6 will contain a fix:// https://github.com/emscripten-core/emscripten/pull/23887
However, the workaround is still enabled for all Emscripten versions because it only checks __EMSCRIPTEN__, regardless of the toolchain version.
The upstream fix was included in Emscripten 4.0.6, and CPython now uses Emscripten 6.0.13 (Platforms/emscripten/config.toml).
Therefore, this workaround appears to be obsolete and could potentially be removed, allowing CPython to use Emscripten's native pthread_getattr_np() implementation.
The removal should be verified against the current Emscripten toolchain to ensure that stack boundary detection and recursion protection continue to work correctly.
Two more leftovers from older Emscripten versions:
Deprecated Emscripten flags in configure.ac.--enable-wasm-pthreads links with -sUSE_PTHREADS, and the wasm64-*-emscripten target uses -sMEMORY64=1. Both settings were deprecated in Emscripten 6.0.1 in favor of -pthread and -m64 (Deprecate -sUSE_PTHREADS and -sMEMORY64 in favor of standard flags. emscripten-core/emscripten#27025), and with 6.0.10 they emit -Wdeprecated warnings at link time. The replacements produce identical output. The default build doesn't use either option, so CI doesn't show the warnings.
Activity
pythongh-160873: Use -m64 and -pthread for Emscripten
lpyu001 commentedon Oct 29, 2026
Two more leftovers from older Emscripten versions:
Deprecated Emscripten flags in
configure.ac.--enable-wasm-pthreadslinks with-sUSE_PTHREADS, and thewasm64-*-emscriptentarget uses-sMEMORY64=1. Both settings were deprecated in Emscripten 6.0.1 in favor of-pthreadand-m64(Deprecate-sUSE_PTHREADSand-sMEMORY64in favor of standard flags. emscripten-core/emscripten#27025), and with 6.0.10 they emit-Wdeprecatedwarnings at link time. The replacements produce identical output. The default build doesn't use either option, so CI doesn't show the warnings.Obsolete Emscripten workaround in
test_pathlib.test_glob_dotdotusesNDOTDOTS = 48on Emscripten instead of 50, with a comment saying it can be removed once JS FS: Don't return ELOOP on a path with a large number of ..'s emscripten-core/emscripten#24591 is merged. That fix was merged in June 2025 (Emscripten 4.0.11+), so the workaround is no longer needed with the pinned 6.0.10.