Skip to content

Commit 274b10d

Browse files
authored
Bump cachetools to 5.4.* (#12353)
1 parent 1209816 commit 274b10d

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

stubs/cachetools/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version = "5.3.*"
1+
version = "5.4.*"
22
upstream_repository = "https://github.com/tkem/cachetools"

stubs/cachetools/cachetools/__init__.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from _typeshed import IdentityFunction, Unused
22
from collections.abc import Callable, Iterator, MutableMapping, Sequence
33
from contextlib import AbstractContextManager
44
from typing import Any, TypeVar, overload
5+
from typing_extensions import deprecated
56

67
__all__ = ("Cache", "FIFOCache", "LFUCache", "LRUCache", "MRUCache", "RRCache", "TLRUCache", "TTLCache", "cached", "cachedmethod")
78
__version__: str
@@ -36,6 +37,8 @@ class Cache(MutableMapping[_KT, _VT]):
3637
class FIFOCache(Cache[_KT, _VT]): ...
3738
class LFUCache(Cache[_KT, _VT]): ...
3839
class LRUCache(Cache[_KT, _VT]): ...
40+
41+
@deprecated("@mru_cache is deprecated")
3942
class MRUCache(Cache[_KT, _VT]): ...
4043

4144
class RRCache(Cache[_KT, _VT]):

stubs/cachetools/cachetools/func.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
from _typeshed import IdentityFunction
22
from collections.abc import Callable, Sequence
33
from typing import TypeVar
4+
from typing_extensions import deprecated
45

56
__all__ = ("fifo_cache", "lfu_cache", "lru_cache", "mru_cache", "rr_cache", "ttl_cache")
67
_T = TypeVar("_T")
78

89
def fifo_cache(maxsize: float | None = 128, typed: bool = False) -> IdentityFunction: ...
910
def lfu_cache(maxsize: float | None = 128, typed: bool = False) -> IdentityFunction: ...
1011
def lru_cache(maxsize: float | None = 128, typed: bool = False) -> IdentityFunction: ...
12+
@deprecated("@mru_cache is deprecated")
1113
def mru_cache(maxsize: float | None = 128, typed: bool = False) -> IdentityFunction: ...
1214
def rr_cache(
1315
maxsize: float | None = 128, choice: Callable[[Sequence[_T]], _T] | None = ..., typed: bool = False

stubs/cachetools/cachetools/keys.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from _typeshed import Unused
22
from collections.abc import Hashable
33

4-
__all__ = ("hashkey", "methodkey", "typedkey")
4+
__all__ = ("hashkey", "methodkey", "typedkey", "typedmethodkey")
55

66
def hashkey(*args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ...
77
def methodkey(self: Unused, *args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ...
88
def typedkey(*args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ...
9+
def typedmethodkey(self: Unused, *args: Hashable, **kwargs: Hashable) -> tuple[Hashable, ...]: ...

0 commit comments

Comments
 (0)