Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions ddtrace/contrib/pymemcache/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@
# Use a pin to specify metadata related to this particular client
Pin.override(client, service='my-memcached-service')

Pymemcache's ``HashClient`` will also be indirectly patched as it uses
``Client``s under the hood.
Pymemcache ``HashClient`` will also be indirectly patched as it uses ``Client``
under the hood.
"""
from ...utils.importlib import require_modules

from .patch import patch, unpatch

__all__ = [patch, unpatch]
required_modules = ['pymemcache']

with require_modules(required_modules) as missing_modules:
if not missing_modules:
from .patch import patch, unpatch
__all__ = [
patch,
unpatch,
]