Skip to content

Misleading docstring of class Redis #1442

@homeworkprod

Description

@homeworkprod

My impression is that this docstring is misleading:

class Redis:
    """
    Implementation of the Redis protocol.

    This abstract class provides a Python interface to all Redis commands
    and an implementation of the Redis protocol.

    Connection and Pipeline derive from this, implementing how
    the commands are sent and received to the Redis server
    """

At least in terms of OOP (object-oriented programming), the class Connection does not derive from Redis since at least 2017.
(Pipeline, however, does.)

This seems especially relevant as Redis and Connection are somewhat used interchangeably in the wild; for example in rq, where I'm currently investigating this issue which arises from Connection implementation-specific keyword arguments being obtained from a connection pool and passed to Redis' constructor as if that would be a connection class itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceMaintenance (CI, Releases, etc)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions