diff --git a/newrelic/hooks/datastore_aioredis.py b/newrelic/hooks/datastore_aioredis.py index daced369ab..03c0f0900a 100644 --- a/newrelic/hooks/datastore_aioredis.py +++ b/newrelic/hooks/datastore_aioredis.py @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - from newrelic.api.datastore_trace import DatastoreTrace from newrelic.api.time_trace import current_trace from newrelic.api.transaction import current_transaction @@ -60,6 +59,7 @@ def _nr_wrapper_AioRedis_method_(wrapped, instance, args, kwargs): # Method will return synchronously without executing, # it will be added to the command stack and run later. aioredis_version = get_package_version_tuple("aioredis") + # This conditional is for versions of aioredis that are outside # New Relic's supportability window but will still work. New # Relic does not provide testing/support for this. In order to @@ -139,7 +139,6 @@ async def wrap_Connection_send_command(wrapped, instance, args, kwargs): ): return await wrapped(*args, **kwargs) - # This wrapper is for versions of aioredis that are outside # New Relic's supportability window but will still work. New # Relic does not provide testing/support for this. In order to diff --git a/newrelic/hooks/datastore_redis.py b/newrelic/hooks/datastore_redis.py index 0f1c522b76..2bfa626840 100644 --- a/newrelic/hooks/datastore_redis.py +++ b/newrelic/hooks/datastore_redis.py @@ -18,6 +18,7 @@ from newrelic.api.transaction import current_transaction from newrelic.common.object_wrapper import function_wrapper, wrap_function_wrapper + _redis_client_sync_methods = { "acl_dryrun", "auth", @@ -612,7 +613,6 @@ def instrument_asyncio_redis_client(module): if hasattr(class_, operation): _wrap_asyncio_Redis_method_wrapper(module, "Redis", operation) - def instrument_redis_commands_core(module): _instrument_redis_commands_module(module, "CoreCommands") diff --git a/tests/datastore_aioredis/test_execute_command.py b/tests/datastore_aioredis/test_execute_command.py index 54851a6592..b600abea5a 100644 --- a/tests/datastore_aioredis/test_execute_command.py +++ b/tests/datastore_aioredis/test_execute_command.py @@ -13,8 +13,6 @@ # limitations under the License. import pytest - -# import aioredis from conftest import AIOREDIS_VERSION, loop # noqa # pylint: disable=E0611,W0611 from testing_support.db_settings import redis_settings from testing_support.fixtures import override_application_settings diff --git a/tests/datastore_redis/test_asyncio.py b/tests/datastore_redis/test_asyncio.py index 5ffdda5829..00aa318783 100644 --- a/tests/datastore_redis/test_asyncio.py +++ b/tests/datastore_redis/test_asyncio.py @@ -104,4 +104,4 @@ async def _test_pubsub(): await future loop.run_until_complete(_test_pubsub()) - assert messages_received == ["Hello", "World", "NOPE"] + assert messages_received == ["Hello", "World", "NOPE"] \ No newline at end of file