def parse_redis_url(url):
    """
    Given a url like redis://localhost:6379/0, return a dict with host, port,
    and db members.
    """
    warnings.warn(
        "Use redis.StrictRedis.from_url instead", DeprecationWarning,
        stacklevel=2)
    parsed = urllib.parse.urlsplit(url)
    return {
        'host': parsed.hostname,
        'port': parsed.port,
        'db': int(parsed.path.replace('/', '')),
    }