-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Hi,
since redis-py v7 a warning is issued if protocol=3 but the server doesn't support the latest maintenance notification feature:
>>> import redis
>>> r = redis.Redis()
>>> r.get('foo')
>>> r = redis.Redis(protocol=3)
>>> r.get('foo')
Failed to enable maintenance notifications: unknown subcommand 'MAINT_NOTIFICATIONS'. Try CLIENT HELP.By explicitly disabling the feature the warning also disappears:
>>> import redis
>>> from redis.maint_notifications import MaintNotificationsConfig
>>> r = redis.Redis(protocol=3, maint_notifications_config=MaintNotificationsConfig(enabled=False))
>>> r.get('foo')The default for maintenance configuration is "auto". IMHO, this implies a more graceful handling of unsupported servers, i.e., not logging anything. Maybe this warning could simply be removed?
Metadata
Metadata
Assignees
Labels
No labels