Skip to content

DEP(deps): Update cachetools requirement from ~=5.5.2 to ~=6.0.0 #1769

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 26, 2025

Updates the requirements on cachetools to permit the latest version.

Changelog

Sourced from cachetools's changelog.

v6.0.0 (2025-05-23)

  • Require Python 3.9 or later (breaking change).

  • Remove MRUCache and the @func.mru_cache decorator (breaking change).

  • Add an optional condition parameter to the @cached and @cachedmethod decorators, which, when used with a threading.Condition instance, should improve cache stampede <https://en.wikipedia.org/wiki/Cache_stampede>_ issues in massively parallel environments. Note that this will inflict some performance penalty, and therefore has to be enabled explicitly.

  • Convert the cachetools.func decorators to use a threading.Condition instance to deal with cache stampede <https://en.wikipedia.org/wiki/Cache_stampede>_ issues. Note that this may result in a noticable performance degradation, depending on your actual use case.

  • Deprecate support for cache(self) returning None to suppress caching with the @cachedmethod decorator.

  • Improve documentation.

  • Update CI environment.

v5.5.2 (2025-02-20)

  • Reduce number of @cached lock/unlock operations.

  • Improve documentation.

  • Update CI environment.

v5.5.1 (2025-01-21)

  • Add documentation regarding caching of exceptions.

  • Officially support Python 3.13.

  • Update CI environment.

v5.5.0 (2024-08-18)

... (truncated)

Commits
  • e497575 Release v6.0.0.
  • 0a8f391 Update related projects section.
  • 3afef37 Pre-release v6.0.0b4.
  • 34815dd Update documentation for v6.0.0.
  • 8854b50 Add intersphinx extension.
  • 0af4a07 Bump codecov/codecov-action from 5.4.0 to 5.4.2
  • ad42371 Merge pull request #349 from tkem/dependabot/github_actions/actions/setup-pyt...
  • 987c076 Bump actions/setup-python from 5.5.0 to 5.6.0
  • 27d0dce Add cache_condition wrapper attribute (and refactor a bit).
  • 37b5c12 Use class method attributes in tests.
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Summary by Sourcery

Build:

  • Bump cachetools requirement from ~=5.5.2 to ~=6.0.0 in both main and documentation requirements

@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels May 26, 2025
Copy link

sourcery-ai bot commented May 26, 2025

Reviewer's Guide

Bump cachetools dependency from ~=5.5.2 to ~=6.0.0 across project requirements to permit the latest major release.

Sequence Diagram: Using Optional condition with @cached in cachetools v6.0.0

sequenceDiagram
  participant Caller
  participant DecoratedFunction as "func() @cached(condition=cond)"
  participant CacheObject as "Cache Implementation"
  participant ConditionObject as "threading.Condition"

  Caller->>DecoratedFunction: Invoke func()
  activate DecoratedFunction
  DecoratedFunction->>ConditionObject: acquire() # New behavior with condition
  alt Cache Hit
    DecoratedFunction->>CacheObject: Get(key)
    CacheObject-->>DecoratedFunction: Return cached_value
    DecoratedFunction-->>Caller: cached_value
  else Cache Miss
    DecoratedFunction->>CacheObject: Get(key)
    CacheObject-->>DecoratedFunction: Not found / Miss
    note over DecoratedFunction: Compute result_value
    DecoratedFunction->>CacheObject: Set(key, result_value)
    DecoratedFunction-->>Caller: result_value
  end
  DecoratedFunction->>ConditionObject: notify_all() # If other threads are waiting
  DecoratedFunction->>ConditionObject: release()
  deactivate DecoratedFunction
Loading

Class Diagram: API Changes in Upgraded cachetools Library (v6.0.0)

classDiagram
  class MRUCache {
    <<Removed from cachetools v6.0.0>>
    # This class was part of cachetools and is now removed.
    # Specific attributes/methods are not detailed in the PR summary.
  }
  class mru_cache_decorator {
    <<Removed from cachetools.func in v6.0.0>>
    # This decorator (@func.mru_cache) was part of cachetools and is now removed.
  }
  class cached_decorator {
    <<cachetools.cached>>
    # Existing parameters: cache, key, lock, info
    + condition: Optional[threading.Condition]
    # Other existing methods/attributes unchanged
  }
  class cachedmethod_decorator {
    <<cachetools.cachedmethod>>
    # Existing parameters: cache, key, lock, info
    + condition: Optional[threading.Condition]
    # Other existing methods/attributes unchanged
  }
Loading

File-Level Changes

Change Details Files
Update cachetools version specification to 6.0.0
  • Replace ‘cachetools~=5.5.2’ with ‘cachetools~=6.0.0’ in docs requirements
  • Replace ‘cachetools~=5.5.2’ with ‘cachetools~=6.0.0’ in root requirements
docs/requirements.txt
requirements.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@dependabot dependabot bot force-pushed the dependabot/pip/master/cachetools-approx-eq-6.0.0 branch 4 times, most recently from ab8dab3 to fcdd865 Compare May 30, 2025 06:08
@dependabot dependabot bot force-pushed the dependabot/pip/master/cachetools-approx-eq-6.0.0 branch 6 times, most recently from 154f792 to 67da50d Compare June 9, 2025 07:06
@dependabot dependabot bot force-pushed the dependabot/pip/master/cachetools-approx-eq-6.0.0 branch from 67da50d to 84ba7af Compare June 10, 2025 06:50
Updates the requirements on [cachetools](https://github.com/tkem/cachetools) to permit the latest version.
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](tkem/cachetools@v5.5.2...v6.0.0)

---
updated-dependencies:
- dependency-name: cachetools
  dependency-version: 6.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/pip/master/cachetools-approx-eq-6.0.0 branch from 84ba7af to 73aaaf0 Compare June 11, 2025 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file python Pull requests that update python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant