Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies = [
"cryptography",
"packaging",
"python-dateutil",
"cachetools<7.1.0", # Pin to work around https://github.com/tkem/cachetools/issues/394
"cachetools",
"gitpython",
"jsonschema",
"paramiko>=3.2.0",
Expand Down
3 changes: 2 additions & 1 deletion src/dstack/_internal/core/backends/aws/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,13 @@ def _get_offers_cached_key(self, requirements: Requirements) -> int:
# Requirements is not hashable, so we use a hack to get arguments hash
return hash(requirements.json())

# For `pyright: ignore` directive, see: https://github.com/tkem/cachetools/issues/394
@cachedmethod(
cache=lambda self: self._offers_post_filter_cache.cache,
key=_get_offers_cached_key,
lock=lambda self: self._offers_post_filter_cache.lock,
)
def get_offers_post_filter(
def get_offers_post_filter( # pyright: ignore[reportIncompatibleMethodOverride]
self, requirements: Requirements
) -> Optional[Callable[[InstanceOfferWithAvailability], bool]]:
if requirements.reservation:
Expand Down
Loading