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

Python Compatibility - kombu.utils.compat

Python Compatibility Utilities.

kombu.utils.compat.coro(gen)[source]

Decorator to mark generator as co-routine.

kombu.utils.compat.detect_environment()[source]

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

kombu.utils.compat.entrypoints(namespace)[source]

Return setuptools entrypoints for namespace.

kombu.utils.compat.fileno(f)[source]

Get fileno from file-like object.

kombu.utils.compat.maybe_fileno(f)[source]

Get object fileno, or None if not defined.

kombu.utils.compat.nested(*managers)[source]

Nest context managers.