1 from __future__
import annotations
9 LINUX = sys.platform.startswith(
"linux")
10 MACOS = sys.platform.startswith(
"darwin")
11 WIN = sys.platform.startswith(
"win32")
or sys.platform.startswith(
"cygwin")
13 CPYTHON = platform.python_implementation() ==
"CPython"
14 PYPY = platform.python_implementation() ==
"PyPy"
15 PY_GIL_DISABLED = bool(sysconfig.get_config_var(
"Py_GIL_DISABLED"))
20 pytest.deprecated_call() seems broken in pytest<3.9.x; concretely, it
21 doesn't work on CPython 3.8.0 with pytest==3.3.2 on Ubuntu 18.04 (#2922).
23 This is a narrowed reimplementation of the following PR :(
24 https://github.com/pytest-dev/pytest/pull/4104
27 pieces = pytest.__version__.split(
".")
28 pytest_major_minor = (
int(pieces[0]),
int(pieces[1]))
29 if pytest_major_minor < (3, 9):
30 return pytest.warns((DeprecationWarning, PendingDeprecationWarning))
31 return pytest.deprecated_call()