diff --git a/redis/_parsers/base.py b/redis/_parsers/base.py index 928ec0c201..4c83495a61 100644 --- a/redis/_parsers/base.py +++ b/redis/_parsers/base.py @@ -4,7 +4,7 @@ from asyncio import IncompleteReadError, StreamReader, TimeoutError from typing import Awaitable, Callable, List, Optional, Protocol, Union -from redis.maintenance_events import ( +from redis.maint_notifications import ( MaintenanceNotification, NodeFailedOverNotification, NodeFailingOverNotification, diff --git a/redis/client.py b/redis/client.py index ff92955917..163ef3fedc 100755 --- a/redis/client.py +++ b/redis/client.py @@ -56,7 +56,7 @@ WatchError, ) from redis.lock import Lock -from redis.maintenance_events import ( +from redis.maint_notifications import ( MaintNotificationsConfig, MaintNotificationsPoolHandler, ) diff --git a/redis/connection.py b/redis/connection.py index e31e946d66..7c7071f635 100644 --- a/redis/connection.py +++ b/redis/connection.py @@ -47,7 +47,7 @@ ResponseError, TimeoutError, ) -from .maintenance_events import ( +from .maint_notifications import ( MaintenanceState, MaintNotificationsConfig, MaintNotificationsConnectionHandler, diff --git a/redis/maintenance_events.py b/redis/maint_notifications.py similarity index 100% rename from redis/maintenance_events.py rename to redis/maint_notifications.py diff --git a/tests/test_maintenance_events.py b/tests/test_maint_notifications.py similarity index 99% rename from tests/test_maintenance_events.py rename to tests/test_maint_notifications.py index 60a85c7bea..b365189b7b 100644 --- a/tests/test_maintenance_events.py +++ b/tests/test_maint_notifications.py @@ -4,7 +4,7 @@ from redis.connection import ConnectionInterface -from redis.maintenance_events import ( +from redis.maint_notifications import ( MaintenanceNotification, NodeMovingNotification, NodeMigratingNotification, diff --git a/tests/test_maintenance_events_handling.py b/tests/test_maint_notifications_handling.py similarity index 99% rename from tests/test_maintenance_events_handling.py rename to tests/test_maint_notifications_handling.py index c974eaaef7..38f614bb90 100644 --- a/tests/test_maintenance_events_handling.py +++ b/tests/test_maint_notifications_handling.py @@ -13,7 +13,7 @@ BlockingConnectionPool, MaintenanceState, ) -from redis.maintenance_events import ( +from redis.maint_notifications import ( MaintNotificationsConfig, NodeMigratingNotification, NodeMigratedNotification, @@ -668,7 +668,7 @@ def test_pool_handler_with_migrating_notification(self): patch.object( pool_handler, "handle_node_moving_notification" ) as mock_handle_moving, - patch("redis.maintenance_events.logging.error") as mock_logging_error, + patch("redis.maint_notifications.logging.error") as mock_logging_error, ): # Pool handler should return None for migrating notifications (not its responsibility) pool_handler.handle_notification(migrating_notification) diff --git a/tests/test_scenario/conftest.py b/tests/test_scenario/conftest.py index afc4f5df1c..531d09baa4 100644 --- a/tests/test_scenario/conftest.py +++ b/tests/test_scenario/conftest.py @@ -7,7 +7,7 @@ from redis.backoff import ExponentialWithJitterBackoff, NoBackoff from redis.client import Redis -from redis.maintenance_events import EndpointType, MaintNotificationsConfig +from redis.maint_notifications import EndpointType, MaintNotificationsConfig from redis.retry import Retry from tests.test_scenario.fault_injector_client import FaultInjectorClient diff --git a/tests/test_scenario/hitless_upgrade_helpers.py b/tests/test_scenario/maint_notifications_helpers.py similarity index 100% rename from tests/test_scenario/hitless_upgrade_helpers.py rename to tests/test_scenario/maint_notifications_helpers.py diff --git a/tests/test_scenario/test_hitless_upgrade.py b/tests/test_scenario/test_maint_notifications.py similarity index 99% rename from tests/test_scenario/test_hitless_upgrade.py rename to tests/test_scenario/test_maint_notifications.py index 601b4b5a18..a13299bfb7 100644 --- a/tests/test_scenario/test_hitless_upgrade.py +++ b/tests/test_scenario/test_maint_notifications.py @@ -12,7 +12,7 @@ from redis import Redis from redis.connection import ConnectionInterface -from redis.maintenance_events import ( +from redis.maint_notifications import ( EndpointType, MaintNotificationsConfig, MaintenanceState, @@ -25,7 +25,7 @@ from tests.test_scenario.fault_injector_client import ( FaultInjectorClient, ) -from tests.test_scenario.hitless_upgrade_helpers import ( +from tests.test_scenario.maint_notifications_helpers import ( ClientValidations, ClusterOperations, ) @@ -33,6 +33,7 @@ logging.basicConfig( level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s", + datefmt="%Y-%m-%d %H:%M:%S:%f", ) BIND_TIMEOUT = 30