Upgrading cachetools 7 to 8
Breaking7.3.0 → 8.0.0Breaking7Platform1Changed1Other2
BreakingUpgrade verdict
7 breaking changes and a platform requirement change.
In plain terms
- Old, already deprecated options of the cachedmethod decorator no longer work.
- Passing cache=None to the cached decorator is no longer allowed.
- If you use your own cache class with info=True, it must now implement __len__.
- The internal cache info type is now a public class named CacheInfo.
Must act Top 4 of 8 that need code or config changes
Python requirement changed in 8.0.0: >=3.10 → >=3.11.
What you must change
Breaking7
Drops support for deprecated @cachedmethod features.
@cachedmethodDrops support for @cached(cache=None).
@cachedRequires custom cache classes to support __len__ when used with info=True.
__len__infoRefactors _CacheInfo and makes it public as CacheInfo.
_CacheInfoCacheInfoReturns callable objects instead of functions from @cached and cachetools.func decorators.
@cachedcachetools.funcDoes not set cache_info to None on @cached wrappers when info is not set.
cache_info@cachedinfoRaises TypeError for @cachedmethod descriptors assigned after class creation.
TypeError@cachedmethod__set_name__Platform1
Drops Python 3.10 support.