Skip to content

Commit e138000

Browse files
authored
Renaming maintenance_events to maint_notifications part 2: renaming the files. (#3778)
1 parent 1bc9599 commit e138000

9 files changed

+10
-9
lines changed

redis/_parsers/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from asyncio import IncompleteReadError, StreamReader, TimeoutError
55
from typing import Awaitable, Callable, List, Optional, Protocol, Union
66

7-
from redis.maintenance_events import (
7+
from redis.maint_notifications import (
88
MaintenanceNotification,
99
NodeFailedOverNotification,
1010
NodeFailingOverNotification,

redis/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
WatchError,
5757
)
5858
from redis.lock import Lock
59-
from redis.maintenance_events import (
59+
from redis.maint_notifications import (
6060
MaintNotificationsConfig,
6161
MaintNotificationsPoolHandler,
6262
)

redis/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
ResponseError,
4848
TimeoutError,
4949
)
50-
from .maintenance_events import (
50+
from .maint_notifications import (
5151
MaintenanceState,
5252
MaintNotificationsConfig,
5353
MaintNotificationsConnectionHandler,
File renamed without changes.

tests/test_maintenance_events.py renamed to tests/test_maint_notifications.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from redis.connection import ConnectionInterface
66

7-
from redis.maintenance_events import (
7+
from redis.maint_notifications import (
88
MaintenanceNotification,
99
NodeMovingNotification,
1010
NodeMigratingNotification,

tests/test_maintenance_events_handling.py renamed to tests/test_maint_notifications_handling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
BlockingConnectionPool,
1414
MaintenanceState,
1515
)
16-
from redis.maintenance_events import (
16+
from redis.maint_notifications import (
1717
MaintNotificationsConfig,
1818
NodeMigratingNotification,
1919
NodeMigratedNotification,
@@ -668,7 +668,7 @@ def test_pool_handler_with_migrating_notification(self):
668668
patch.object(
669669
pool_handler, "handle_node_moving_notification"
670670
) as mock_handle_moving,
671-
patch("redis.maintenance_events.logging.error") as mock_logging_error,
671+
patch("redis.maint_notifications.logging.error") as mock_logging_error,
672672
):
673673
# Pool handler should return None for migrating notifications (not its responsibility)
674674
pool_handler.handle_notification(migrating_notification)

tests/test_scenario/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from redis.backoff import ExponentialWithJitterBackoff, NoBackoff
99
from redis.client import Redis
10-
from redis.maintenance_events import EndpointType, MaintNotificationsConfig
10+
from redis.maint_notifications import EndpointType, MaintNotificationsConfig
1111
from redis.retry import Retry
1212
from tests.test_scenario.fault_injector_client import FaultInjectorClient
1313

File renamed without changes.

tests/test_scenario/test_hitless_upgrade.py renamed to tests/test_scenario/test_maint_notifications.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from redis import Redis
1414
from redis.connection import ConnectionInterface
15-
from redis.maintenance_events import (
15+
from redis.maint_notifications import (
1616
EndpointType,
1717
MaintNotificationsConfig,
1818
MaintenanceState,
@@ -25,14 +25,15 @@
2525
from tests.test_scenario.fault_injector_client import (
2626
FaultInjectorClient,
2727
)
28-
from tests.test_scenario.hitless_upgrade_helpers import (
28+
from tests.test_scenario.maint_notifications_helpers import (
2929
ClientValidations,
3030
ClusterOperations,
3131
)
3232

3333
logging.basicConfig(
3434
level=logging.INFO,
3535
format="%(asctime)s %(levelname)s %(message)s",
36+
datefmt="%Y-%m-%d %H:%M:%S:%f",
3637
)
3738

3839
BIND_TIMEOUT = 30

0 commit comments

Comments
 (0)