Skip to content

Add back cachetools stubs #6096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Sep 30, 2021
Merged

Add back cachetools stubs #6096

merged 12 commits into from
Sep 30, 2021

Conversation

Akuli
Copy link
Collaborator

@Akuli Akuli commented Sep 30, 2021

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.

Copy link
Collaborator

@srittau srittau left a comment

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