Skip to content

Add back cachetools stubs - #6096

Merged
srittau merged 12 commits into
python:masterfrom
Akuli:cachetools3
Sep 30, 2021
Merged

srittau merged 12 commits into
python:masterfrom
Akuli:cachetools3

Conversation

@Akuli

@Akuli Akuli commented Sep 30, 2021 •

Copy link
Copy Markdown
Collaborator

These were previously removed in #6093

  • Added FIFO and MRU caches. This means that there is a new class cachetools.FIFOCache, a new function cachetools.func.fifo_cache, a new module cachetools.fifo, and similarly for MRU.
  • Cache-type-specific submodules, such as cachetools.fifo and cachetools.lru, are now deprecated. Each of them contains one class that is also available directly in cachetools, so from cachetools.lru import LRUCache is deprecated in favor of from cachetools import LRUCache.
  • The timer argument of cachetools.func.ttl_cache now has the correct type. Previously it was a float, even though it should be a callable that returns a float.

This is probably easiest to review as a whole, not commit-by-commit. Cachetools is not a big package.

@srittau srittau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems cachetools 4.2.4 re-added the missing modules.

@srittau
srittau merged commit 3eee9e1 into python:master Sep 30, 2021
@Akuli
Akuli deleted the cachetools3 branch October 14, 2021 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants