We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef5f22 commit 6d3546aCopy full SHA for 6d3546a
ddtrace/contrib/pymemcache/__init__.py
@@ -21,10 +21,18 @@
21
# Use a pin to specify metadata related to this particular client
22
Pin.override(client, service='my-memcached-service')
23
24
-Pymemcache's ``HashClient`` will also be indirectly patched as it uses
25
-``Client``s under the hood.
+Pymemcache ``HashClient`` will also be indirectly patched as it uses ``Client``
+under the hood.
26
"""
27
+from ...utils.importlib import require_modules
28
-from .patch import patch, unpatch
29
30
-__all__ = [patch, unpatch]
+required_modules = ['pymemcache']
31
+
32
+with require_modules(required_modules) as missing_modules:
33
+ if not missing_modules:
34
+ from .patch import patch, unpatch
35
+ __all__ = [
36
+ patch,
37
+ unpatch,
38
+ ]
0 commit comments