Skip to content

Commit

Permalink
Add a WASM constant for Emscripten platform checks
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Mar 5, 2024
1 parent bbc8868 commit f049ac2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pandas/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
PY311,
PY312,
PYPY,
WASM,
)
import pandas.compat.compressors
from pandas.compat.numpy import is_numpy_dev
Expand Down Expand Up @@ -192,4 +193,5 @@ def get_bz2_file() -> type[pandas.compat.compressors.BZ2File]:
"PY311",
"PY312",
"PYPY",
"WASM",
]
2 changes: 2 additions & 0 deletions pandas/compat/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -27,4 +28,5 @@
"PY311",
"PY312",
"PYPY",
"WASM",
]

0 comments on commit f049ac2

Please sign in to comment.