INNER CODE UNIT · Python

_pop_kwds_with_deprecation

python-cachier/cachier · src/cachier/core.py:205

def _pop_kwds_with_deprecation(kwds, name: str, default_value: bool):
    if name in kwds:
        warnings.warn(
            f"`{name}` is deprecated and will be removed in a future release, use `cachier__` alternative instead.",
            DeprecationWarning,
            stacklevel=2,
        )
    return kwds.pop(name, default_value)


def _is_async_redis_client(client: Any) -> bool:
    if client is None:
        return False
    method_names = ("hgetall", "hset", "keys", "delete", "hget")
    return all(inspect.iscoroutinefunction(getattr(client, name, None)) for name in method_names)


def cachier(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…