diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py index 738442fab8c70..c7eeaa5f660bd 100644 --- a/pandas/compat/__init__.py +++ b/pandas/compat/__init__.py @@ -21,6 +21,7 @@ PY311, PY312, PYPY, + WASM, ) import pandas.compat.compressors from pandas.compat.numpy import is_numpy_dev @@ -192,4 +193,5 @@ def get_bz2_file() -> type[pandas.compat.compressors.BZ2File]: "PY311", "PY312", "PYPY", + "WASM", ] diff --git a/pandas/compat/_constants.py b/pandas/compat/_constants.py index 7bc3fbaaefebf..2625389e5254a 100644 --- a/pandas/compat/_constants.py +++ b/pandas/compat/_constants.py @@ -17,6 +17,7 @@ PY311 = sys.version_info >= (3, 11) PY312 = sys.version_info >= (3, 12) PYPY = platform.python_implementation() == "PyPy" +WASM = (sys.platform == "emscripten") or (platform.machine() in ["wasm32", "wasm64"]) ISMUSL = "musl" in (sysconfig.get_config_var("HOST_GNU_TYPE") or "") REF_COUNT = 2 if PY311 else 3 @@ -27,4 +28,5 @@ "PY311", "PY312", "PYPY", + "WASM", ]