Skip to content

Update cachetools to 7.1.4#1044

Closed
pyup-bot wants to merge 1 commit into
masterfrom
pyup-update-cachetools-4.2.4-to-7.1.4
Closed

Update cachetools to 7.1.4#1044
pyup-bot wants to merge 1 commit into
masterfrom
pyup-update-cachetools-4.2.4-to-7.1.4

Conversation

@pyup-bot

Copy link
Copy Markdown
Collaborator

This PR updates cachetools from 4.2.4 to 7.1.4.

Changelog

7.1.4

===================

- Minor unit test improvements.

- Update build environment.

7.1.3

===================

- Minor type stub improvements.

- Update build environment.

7.1.2

===================

- Minor type stub improvements.

- Minor documentation improvements.

- Modernize build environment.

7.1.1

===================

- Various type stub improvements.

7.1.0

===================

- Add type stubs based on the work of the good people at `typeshed
<https://github.com/python/typeshed/tree/main/stubs/cachetools/>`__.

- Update unit tests.

7.0.6

===================

- Minor code improvements.

- Update project URLs.

- Update CI environment.

7.0.5

===================

- Minor ``cachedmethod`` performance improvements.

7.0.4

===================

- Fix and properly document ``cachedmethod.cache_key`` behavior.

- Minor documentation improvements.

7.0.3

===================

- Fix ``DeprecationWarning`` when creating an autospec mock with
``cachedmethod`` decorations.

7.0.2

===================

- Provide more efficient ``clear()`` implementation for all support
Cache classes (courtesy Josep Pon Farreny).

7.0.1

===================

- Various test improvements.

- Update Copilot Instructions.

7.0.0

===================

- Require Python 3.10 or later (breaking change).

- Drop support for passing ``info`` as fourth positional parameter to
``cached`` (breaking change).

- Drop support for ``cache(self)`` returning ``None`` with
``cachedmethod`` (breaking change).

- Convert the ``cachedmethod`` wrappers to descriptors, deprecating
its use with class methods and instances that do not provide a
mutable ``__dict__`` attribute (potentially breaking change).

- Convert the previously undocumented ``cachedmethod`` attributes
(``cache``, ``cache_lock``, etc.) to properties for instance
methods, providing official support and documentation (potentially
breaking change).

- Add an optional ``info`` parameter to the ``cachedmethod``
decorator for reporting per-instance cache statistics.  Note that
this requires the instance's ``__dict__`` attribute to be a mutable
mapping.

6.2.6

===================

- Improve typedkey performance.

- Minor documentation improvements.

- Minor testing improvements.

- Minor code readability improvements.

6.2.5

===================

- Improve documentation regarding ``cachedmethod`` with ``lock``
parameter.

- Add test cases for cache stampede scenarios.

- Update CI environment.

6.2.4

===================

- Fix license information displayed on PyPI be using an updated
version of ``twine`` for uploading.

6.2.3

===================

- Improve documentation regarding ``cachedmethod`` with ``condition``
parameter.

- Minor style and readability improvements.

- Modernize build environment.

- Update CI environment.

6.2.2

===================

- Minor improvements from GitHub Copilot code review.

- Improve documentation.

6.2.1

===================

- Add support for Python 3.14.

- Improve documentation.

- Update CI environment.

6.2.0

===================

- Improve general ``RRCache`` performance by storing cache keys in an
additional sequence container.  Note that this will increase memory
consumption.

- Add more unit tests.

6.1.0

===================

- Improve ``LFUCache`` insertion performance by switching to an
implementation based on the `cacheing
<https://pypi.org/project/cacheing/>`_ library.

- Update CI environment.

6.0.0

===================

- 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.

5.5.2

===================

- Reduce number of ``cached`` lock/unlock operations.

- Improve documentation.

- Update CI environment.

5.5.1

===================

- Add documentation regarding caching of exceptions.

- Officially support Python 3.13.

- Update CI environment.

5.5.0

===================

- ``TTLCache.expire()`` returns iterable of expired ``(key, value)``
pairs.

- ``TLRUCache.expire()`` returns iterable of expired ``(key, value)``
pairs.

- Documentation improvements.

- Update CI environment.

5.4.0

===================

- Add the ``keys.typedmethodkey`` decorator.

- Deprecate ``MRUCache`` class.

- Deprecate ``func.mru_cache`` decorator.

- Update CI environment.

5.3.3

===================

- Documentation improvements.

- Update CI environment.

5.3.2

===================

- Add support for Python 3.12.

- Various documentation improvements.

5.3.1

===================

- Depend on Python >= 3.7.

5.3.0

===================

- Add ``cache_info()`` function to ``cached`` decorator.

5.2.1

===================

- Add support for Python 3.11.

- Correct version information in RTD documentation.

- ``badges/shields``: Change to GitHub workflow badge routes.

5.2.0

===================

- Add ``cachetools.keys.methodkey()``.

- Add ``cache_clear()`` function to decorators.

- Add ``src`` directory to ``sys.path`` for Sphinx autodoc.

- Modernize ``func`` wrappers.

5.1.0

===================

- Add cache decorator parameters as wrapper function attributes.

5.0.0

===================

- Require Python 3.7 or later (breaking change).

- Remove deprecated submodules (breaking change).

The ``cache``, ``fifo``, ``lfu``, ``lru``, ``mru``, ``rr`` and
``ttl`` submodules have been deleted.  Therefore, statements like

``from cachetools.ttl import TTLCache``

will no longer work. Use

``from cachetools import TTLCache``

instead.

- Pass ``self`` to ``cachedmethod`` key function (breaking change).

The ``key`` function passed to the ``cachedmethod`` decorator is
now called as ``key(self, *args, **kwargs)``.

The default key function has been changed to ignore its first
argument, so this should only affect applications using custom key
functions with the ``cachedmethod`` decorator.

- Change exact time of expiration in ``TTLCache`` (breaking change).

``TTLCache`` items now get expired if their expiration time is less
than *or equal to* ``timer()``.  For applications using the default
``timer()``, this should be barely noticeable, but it may affect the
use of custom timers with larger tick intervals.  Note that this
also implies that a ``TTLCache`` with ``ttl=0`` can no longer hold
any items, since they will expire immediately.

- Change ``Cache.__repr__()`` format (breaking change).

String representations of cache instances now use a more compact and
efficient format, e.g.

``LRUCache({1: 1, 2: 2}, maxsize=10, currsize=2)``

- Add TLRU cache implementation.

- Documentation improvements.
Links

@pyup-bot

Copy link
Copy Markdown
Collaborator Author

Closing this in favor of #1087

@pyup-bot pyup-bot closed this Jul 20, 2026
@fake-name
fake-name deleted the pyup-update-cachetools-4.2.4-to-7.1.4 branch July 20, 2026 15:41
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.

1 participant