Bump cachetools to 6.0.* (#14131)

This commit is contained in:
Semyon Moroz
2025-05-24 16:06:15 +00:00
committed by GitHub
parent ce0596bc81
commit bf236b7c36
4 changed files with 15 additions and 12 deletions
@@ -9,9 +9,6 @@ cachetools.LFUCache.__setitem__
cachetools.LRUCache.__delitem__
cachetools.LRUCache.__getitem__
cachetools.LRUCache.__setitem__
cachetools.MRUCache.__delitem__
cachetools.MRUCache.__getitem__
cachetools.MRUCache.__setitem__
cachetools.TLRUCache.__delitem__
cachetools.TLRUCache.__getitem__
cachetools.TLRUCache.__setitem__
+1 -1
View File
@@ -1,2 +1,2 @@
version = "5.5.*"
version = "6.0.*"
upstream_repository = "https://github.com/tkem/cachetools"
+13 -4
View File
@@ -1,10 +1,11 @@
from _typeshed import IdentityFunction, Unused
from collections.abc import Callable, Iterator, MutableMapping, Sequence
from contextlib import AbstractContextManager
from threading import Condition
from typing import Any, TypeVar, overload
from typing_extensions import deprecated
__all__ = ("Cache", "FIFOCache", "LFUCache", "LRUCache", "MRUCache", "RRCache", "TLRUCache", "TTLCache", "cached", "cachedmethod")
__all__ = ("Cache", "FIFOCache", "LFUCache", "LRUCache", "RRCache", "TLRUCache", "TTLCache", "cached", "cachedmethod")
__version__: str
_KT = TypeVar("_KT")
@@ -38,9 +39,6 @@ class FIFOCache(Cache[_KT, _VT]): ...
class LFUCache(Cache[_KT, _VT]): ...
class LRUCache(Cache[_KT, _VT]): ...
@deprecated("@mru_cache is deprecated")
class MRUCache(Cache[_KT, _VT]): ...
class RRCache(Cache[_KT, _VT]):
@overload
def __init__(self, maxsize: float, choice: None = None, getsizeof: None = None) -> None: ...
@@ -99,14 +97,25 @@ class TLRUCache(_TimedCache[_KT, _VT]):
def ttu(self) -> Callable[[_KT, _VT, float], float]: ...
def expire(self, time: float | None = None) -> list[tuple[_KT, _VT]]: ...
@overload
def cached(
cache: MutableMapping[_KT, Any] | None,
key: Callable[..., _KT] = ...,
lock: AbstractContextManager[Any] | None = None,
condition: Condition | None = None,
info: bool = False,
) -> IdentityFunction: ...
@overload
@deprecated("Passing `info` as positional parameter is deprecated.")
def cached(
cache: MutableMapping[_KT, Any] | None,
key: Callable[..., _KT] = ...,
lock: AbstractContextManager[Any] | None = None,
condition: bool | None = None,
) -> IdentityFunction: ...
def cachedmethod(
cache: Callable[[Any], MutableMapping[_KT, Any] | None],
key: Callable[..., _KT] = ...,
lock: Callable[[Any], AbstractContextManager[Any]] | None = None,
condition: Condition | None = None,
) -> IdentityFunction: ...
+1 -4
View File
@@ -1,16 +1,13 @@
from _typeshed import IdentityFunction
from collections.abc import Callable, Sequence
from typing import TypeVar
from typing_extensions import deprecated
__all__ = ("fifo_cache", "lfu_cache", "lru_cache", "mru_cache", "rr_cache", "ttl_cache")
__all__ = ("fifo_cache", "lfu_cache", "lru_cache", "rr_cache", "ttl_cache")
_T = TypeVar("_T")
def fifo_cache(maxsize: float | None = 128, typed: bool = False) -> IdentityFunction: ...
def lfu_cache(maxsize: float | None = 128, typed: bool = False) -> IdentityFunction: ...
def lru_cache(maxsize: float | None = 128, typed: bool = False) -> IdentityFunction: ...
@deprecated("@mru_cache is deprecated")
def mru_cache(maxsize: float | None = 128, typed: bool = False) -> IdentityFunction: ...
def rr_cache(
maxsize: float | None = 128, choice: Callable[[Sequence[_T]], _T] | None = ..., typed: bool = False
) -> IdentityFunction: ...