1 34
import os
2 34
import platform
3

4 34
NO_EXTENSIONS = bool(os.environ.get("MULTIDICT_NO_EXTENSIONS"))
5

6 34
PYPY = platform.python_implementation() == "PyPy"
7

8 34
USE_CYTHON_EXTENSIONS = USE_CYTHON = not NO_EXTENSIONS and not PYPY
9

10 34
if USE_CYTHON_EXTENSIONS:
11 32
    try:
12 32
        from . import _multidict  # noqa
13 8
    except ImportError:
14 8
        USE_CYTHON_EXTENSIONS = USE_CYTHON = False

Read our documentation on viewing source code .

Loading