diff --git a/aws_xray_sdk/core/patcher.py b/aws_xray_sdk/core/patcher.py index d51fad93..46334df8 100644 --- a/aws_xray_sdk/core/patcher.py +++ b/aws_xray_sdk/core/patcher.py @@ -5,6 +5,7 @@ SUPPORTED_MODULES = ( 'botocore', + 'pynamodb', 'requests', 'sqlite3', 'mysql', @@ -15,6 +16,7 @@ NO_DOUBLE_PATCH = ( 'botocore', + 'pynamodb', 'requests', 'sqlite3', 'mysql', @@ -42,9 +44,9 @@ def patch(modules_to_patch, raise_errors=True): # elif module_to_patch == 'aioboto3': # modules.add('aiobotocore') # pynamodb requires botocore to be patched as well - # elif module_to_patch == 'pynamodb': - # modules.add('botocore') - # modules.add(module_to_patch) + elif module_to_patch == 'pynamodb': + modules.add('botocore') + modules.add(module_to_patch) else: modules.add(module_to_patch) unsupported_modules = modules - set(SUPPORTED_MODULES) diff --git a/tox.ini b/tox.ini index d94f40b7..0519cc75 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ deps = future # the sdk doesn't support earlier version of django django >= 1.10, <2.0 - pynamodb + pynamodb >= 3.3.1 psycopg2 testing.postgresql @@ -31,8 +31,8 @@ deps = py{35,36}: aiobotocore commands = - py{27,34}: coverage run --source aws_xray_sdk -m py.test tests --ignore tests/ext/aiohttp --ignore tests/ext/aiobotocore --ignore tests/test_async_local_storage.py --ignore tests/test_async_recorder.py --ignore tests/ext/pynamodb - py{35,36}: coverage run --source aws_xray_sdk -m py.test tests --ignore tests/ext/aiobotocore --ignore tests/ext/pynamodb + py{27,34}: coverage run --source aws_xray_sdk -m py.test tests --ignore tests/ext/aiohttp --ignore tests/ext/aiobotocore --ignore tests/test_async_local_storage.py --ignore tests/test_async_recorder.py + py{35,36}: coverage run --source aws_xray_sdk -m py.test tests --ignore tests/ext/aiobotocore setenv = DJANGO_SETTINGS_MODULE = tests.ext.django.app.settings