Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/pandas/compat/_constants.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

17 statements  

1""" 

2_constants 

3====== 

4 

5Constants relevant for the Python implementation. 

6""" 

7 

8from __future__ import annotations 

9 

10import platform 

11import sys 

12import sysconfig 

13 

14IS64 = sys.maxsize > 2**32 

15 

16PY312 = sys.version_info >= (3, 12) 

17PY314 = sys.version_info >= (3, 14) 

18PY315 = sys.version_info >= (3, 15) 

19PYPY = platform.python_implementation() == "PyPy" 

20WASM = (sys.platform == "emscripten") or (platform.machine() in ["wasm32", "wasm64"]) 

21ISMUSL = "musl" in (sysconfig.get_config_var("HOST_GNU_TYPE") or "") 

22# the refcount for self in a chained __setitem__/.(i)loc indexing/method call 

23REF_COUNT = 2 if PY314 else 3 

24REF_COUNT_IDX = 2 

25REF_COUNT_METHOD = 1 if PY314 else 2 

26CHAINED_WARNING_DISABLED = PYPY 

27 

28 

29__all__ = [ 

30 "IS64", 

31 "ISMUSL", 

32 "PY312", 

33 "PY314", 

34 "PY315", 

35 "PYPY", 

36 "WASM", 

37]