Skip to content

Commit

Permalink
revert kombu changes to make slots work
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur committed Dec 16, 2024
1 parent 85296e1 commit 1ad8ae1
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions ddtrace/contrib/kombu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,22 @@
Pin.override(producer, service='kombu-consumer')
"""

from ddtrace.internal.utils.importlib import require_modules

# Required to allow users to import from `ddtrace.contrib.kombu.patch` directly
import warnings as _w

required_modules = ["kombu", "kombu.messaging"]

with _w.catch_warnings():
_w.simplefilter("ignore", DeprecationWarning)
from . import patch as _ # noqa: F401, I001
with require_modules(required_modules) as missing_modules:
if not missing_modules:
# Required to allow users to import from `ddtrace.contrib.kombu.patch` directly
import warnings as _w

# Expose public methods
from ddtrace.contrib.internal.kombu.patch import get_version
from ddtrace.contrib.internal.kombu.patch import patch
with _w.catch_warnings():
_w.simplefilter("ignore", DeprecationWarning)
from . import patch as _ # noqa: F401, I001

# Expose public methods
from ddtrace.contrib.internal.kombu.patch import get_version
from ddtrace.contrib.internal.kombu.patch import patch

__all__ = ["patch", "get_version"]
__all__ = ["patch", "get_version"]

0 comments on commit 1ad8ae1

Please sign in to comment.