This document is for Kombu's development version, which can be significantly different from previous releases. Get the stable docs here: 5.3.

# Python Compatibility - `kombu.utils.compat`

Python Compatibility Utilities.

kombu.utils.compat.coro(gen)

  Decorator to mark generator as co-routine.

kombu.utils.compat.detect_environment()

  Detect the current environment: default, eventlet, or gevent.

kombu.utils.compat.entrypoints(namespace)

  Return setuptools entrypoints for namespace.

kombu.utils.compat.fileno(f)

  Get fileno from file-like object.

kombu.utils.compat.maybe_fileno(f)

  Get object fileno, or `None` if not defined.

kombu.utils.compat.nested(*managers)

  Nest context managers.