Skip to content

Conversation

@majiayu000
Copy link

Summary

Fixes #3817

Redis 5.0 deprecated SLAVE in favor of REPLICA. This adds aliases for the Sentinel APIs to match the modern Redis terminology.

Changes

Added the following aliases (both sync and async):

  • ReplicaNotFoundError (alias for SlaveNotFoundError)
  • Sentinel.replica_for() (alias for slave_for())
  • Sentinel.discover_replicas() (alias for discover_slaves())
  • Sentinel.filter_replicas() (alias for filter_slaves())
  • SentinelConnectionPool.rotate_replicas() (alias for rotate_slaves())

Notes

  • The original slave_* methods are kept for backward compatibility
  • New methods simply delegate to the existing implementations
  • Both redis.sentinel and redis.asyncio.sentinel are updated

🤖 Generated with Claude Code

…is#3817)

Redis 5.0 deprecated SLAVE in favor of REPLICA. This adds aliases for
the Sentinel APIs to match the modern Redis terminology:

- ReplicaNotFoundError (alias for SlaveNotFoundError)
- Sentinel.replica_for() (alias for slave_for())
- Sentinel.discover_replicas() (alias for discover_slaves())
- Sentinel.filter_replicas() (alias for filter_slaves())
- SentinelConnectionPool.rotate_replicas() (alias for rotate_slaves())

Both sync and async implementations are updated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@petyaslavova
Copy link
Collaborator

Hi @majiayu000, thank you for your contribution. We will review your change soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

REPLICA commands missing in Sentinel

2 participants