Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-cachetools for
openSUSE:Factory checked in at 2025-11-21 16:53:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cachetools (Old)
and /work/SRC/openSUSE:Factory/.python-cachetools.new.2061 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cachetools"
Fri Nov 21 16:53:33 2025 rev:28 rq:1318836 version:6.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cachetools/python-cachetools.changes
2025-09-11 14:39:10.247365910 +0200
+++
/work/SRC/openSUSE:Factory/.python-cachetools.new.2061/python-cachetools.changes
2025-11-21 16:53:51.839244571 +0100
@@ -1,0 +2,11 @@
+Thu Nov 20 08:21:17 UTC 2025 - John Paul Adrian Glaubitz
<[email protected]>
+
+- Update to 6.2.2
+ * Minor improvements from GitHub Copilot code review.
+ * Improve documentation.
+- from version 6.2.1
+ * Add support for Python 3.14.
+ * Improve documentation.
+ * Update CI environment.
+
+-------------------------------------------------------------------
Old:
----
cachetools-6.2.0.tar.gz
New:
----
cachetools-6.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cachetools.spec ++++++
--- /var/tmp/diff_new_pack.l3fC6n/_old 2025-11-21 16:53:52.395268002 +0100
+++ /var/tmp/diff_new_pack.l3fC6n/_new 2025-11-21 16:53:52.395268002 +0100
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-cachetools
-Version: 6.2.0
+Version: 6.2.2
Release: 0
Summary: Extensible memoizing collections and decorators
License: MIT
++++++ cachetools-6.2.0.tar.gz -> cachetools-6.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/CHANGELOG.rst
new/cachetools-6.2.2/CHANGELOG.rst
--- old/cachetools-6.2.0/CHANGELOG.rst 2025-08-25 20:50:08.000000000 +0200
+++ new/cachetools-6.2.2/CHANGELOG.rst 2025-11-13 18:42:08.000000000 +0100
@@ -1,3 +1,21 @@
+v6.2.2 (2025-11-13)
+===================
+
+- Minor improvements from GitHub Copilot code review.
+
+- Improve documentation.
+
+
+v6.2.1 (2025-10-12)
+===================
+
+- Add support for Python 3.14.
+
+- Improve documentation.
+
+- Update CI environment.
+
+
v6.2.0 (2025-08-25)
===================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/PKG-INFO
new/cachetools-6.2.2/PKG-INFO
--- old/cachetools-6.2.0/PKG-INFO 2025-08-25 20:57:20.004028300 +0200
+++ new/cachetools-6.2.2/PKG-INFO 2025-11-13 18:42:20.301010400 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: cachetools
-Version: 6.2.0
+Version: 6.2.2
Summary: Extensible memoizing collections and decorators
Home-page: https://github.com/tkem/cachetools/
Author: Thomas Kemmer
@@ -18,6 +18,7 @@
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
+Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
License-File: LICENSE
@@ -116,6 +117,7 @@
------------------------------------------------------------------------
- asyncache_: Helpers to use cachetools_ with asyncio.
+- cachetools-async_: Helpers to use cachetools_ with asyncio.
- cacheing_: Pure Python Cacheing Library.
- CacheToolsUtils_: Stackable cache classes for sharing, encryption,
statistics *and more* on top of cachetools_, redis_ and memcached_.
@@ -145,6 +147,7 @@
.. _MIT License: https://raw.github.com/tkem/cachetools/master/LICENSE
.. _asyncache: https://pypi.org/project/asyncache/
+.. _cachetools-async: https://pypi.org/project/cachetools-async/
.. _cacheing: https://pypi.org/project/cacheing/
.. _CacheToolsUtils: https://pypi.org/project/CacheToolsUtils/
.. _shelved-cache: https://pypi.org/project/shelved-cache/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/README.rst
new/cachetools-6.2.2/README.rst
--- old/cachetools-6.2.0/README.rst 2025-06-16 20:54:51.000000000 +0200
+++ new/cachetools-6.2.2/README.rst 2025-11-13 17:57:37.000000000 +0100
@@ -91,6 +91,7 @@
------------------------------------------------------------------------
- asyncache_: Helpers to use cachetools_ with asyncio.
+- cachetools-async_: Helpers to use cachetools_ with asyncio.
- cacheing_: Pure Python Cacheing Library.
- CacheToolsUtils_: Stackable cache classes for sharing, encryption,
statistics *and more* on top of cachetools_, redis_ and memcached_.
@@ -120,6 +121,7 @@
.. _MIT License: https://raw.github.com/tkem/cachetools/master/LICENSE
.. _asyncache: https://pypi.org/project/asyncache/
+.. _cachetools-async: https://pypi.org/project/cachetools-async/
.. _cacheing: https://pypi.org/project/cacheing/
.. _CacheToolsUtils: https://pypi.org/project/CacheToolsUtils/
.. _shelved-cache: https://pypi.org/project/shelved-cache/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/docs/index.rst
new/cachetools-6.2.2/docs/index.rst
--- old/cachetools-6.2.0/docs/index.rst 2025-08-24 15:50:41.000000000 +0200
+++ new/cachetools-6.2.2/docs/index.rst 2025-11-13 17:44:17.000000000 +0100
@@ -232,7 +232,7 @@
removed after they expire. In this case, :meth:`popitem` will *not*
be called, but :meth:`expire` will be called from the next mutating
operation and will return an iterable of the expired `(key, value)`
-pairs. By overrding :meth:`expire`, a subclass will be able to track
+pairs. By overriding :meth:`expire`, a subclass will be able to track
expired items:
.. doctest::
@@ -350,7 +350,7 @@
`cache stampede`_ issues under high load, depending on your
actual use case. Providing a `condition` variable will mitigate
these situations, but will inflict some performance penalty.
-
+
If no separate `lock` parameter is provided, `condition` must also
implement the `context manager`_ protocol, and will also be used to
guard access to the cache.
@@ -451,7 +451,7 @@
[..., (('fib', 42), 267914296), ..., (('luc', 42), 599074578)]
- Function invocations are _not_ cached if any exception are raised.
+ Function invocations are *not* cached if any exceptions are raised.
To cache some (or all) calls raising exceptions, additional
function wrappers may be introduced which wrap exceptions as
regular function results for caching purposes:
@@ -488,6 +488,49 @@
print(e, "-", _get_pep_wrapped.cache_info())
+ Curiously, default function arguments are not quite handled as one
+ might expect, and also the use of positional vs. keyword arguments
+ may lead to surprising results. In the example below, `foo()`,
+ `foo(1)` and `foo(a=1)` are treated as different function
+ invocations, with separately cached results:
+
+ .. doctest::
+ :pyversion: >= 3
+
+ >>> @cached(LRUCache(maxsize=100))
+ ... def foo(a=1):
+ ... print(f"foo({a}) called")
+ ...
+ >>> foo()
+ foo(1) called
+ >>> foo()
+ >>> foo(1)
+ foo(1) called
+ >>> foo(1)
+ >>> foo(a=1)
+ foo(1) called
+ >>> foo(a=1)
+
+ If consistent behavior is required, a private helper function may
+ be introduced to avoid ambiguities, e.g.:
+
+ .. doctest::
+ :pyversion: >= 3
+
+ >>> def foo(a=1):
+ ... _foo(a)
+ ...
+ >>> @cached(LRUCache(maxsize=100))
+ ... def _foo(a):
+ ... print(f"_foo({a}) called")
+ ...
+ >>> foo()
+ _foo(1) called
+ >>> foo()
+ >>> foo(1)
+ >>> foo(a=1)
+
+
.. decorator:: cachedmethod(cache, key=cachetools.keys.methodkey, lock=None,
condition=None)
Decorator to wrap a class or instance method with a memoizing
@@ -731,8 +774,9 @@
Decorator to wrap a function with a memoizing callable that saves
up to `maxsize` results based on a Least Recently Used (LRU)
- algorithm with a per-item time-to-live (TTL) value.
-
+ algorithm with a per-item time-to-live (TTL) value. By default,
+ the time-to-live is set to 600 seconds and :func:`time.monotonic`
+ is used to retrieve the current time.
.. _@lru_cache:
https://docs.python.org/3/library/functools.html#functools.lru_cache
.. _cache algorithm: https://en.wikipedia.org/wiki/Cache_algorithms
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/setup.cfg
new/cachetools-6.2.2/setup.cfg
--- old/cachetools-6.2.0/setup.cfg 2025-08-25 20:57:20.004028300 +0200
+++ new/cachetools-6.2.2/setup.cfg 2025-11-13 18:42:20.302010300 +0100
@@ -21,6 +21,7 @@
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
+ Programming Language :: Python :: 3.14
Topic :: Software Development :: Libraries :: Python Modules
[options]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/src/cachetools/__init__.py
new/cachetools-6.2.2/src/cachetools/__init__.py
--- old/cachetools-6.2.0/src/cachetools/__init__.py 2025-08-25
20:50:08.000000000 +0200
+++ new/cachetools-6.2.2/src/cachetools/__init__.py 2025-11-13
18:42:08.000000000 +0100
@@ -12,7 +12,7 @@
"cachedmethod",
)
-__version__ = "6.2.0"
+__version__ = "6.2.2"
import collections
import collections.abc
@@ -27,13 +27,13 @@
class _DefaultSize:
__slots__ = ()
- def __getitem__(self, _):
+ def __getitem__(self, _key):
return 1
- def __setitem__(self, _, value):
- assert value == 1
+ def __setitem__(self, _key, _value):
+ pass
- def pop(self, _):
+ def pop(self, _key):
return 1
@@ -55,7 +55,7 @@
def __repr__(self):
return "%s(%s, maxsize=%r, currsize=%r)" % (
- self.__class__.__name__,
+ type(self).__name__,
repr(self.__data),
self.__maxsize,
self.__currsize,
@@ -100,6 +100,12 @@
def __len__(self):
return len(self.__data)
+ # Note that we cannot simply inherit get(), pop() and setdefault()
+ # from MutableMapping, since these rely on __getitem__ throwing a
+ # KeyError on cache miss. This is not the case if __missing__ is
+ # implemented for a Cache subclass, so we have to roll our own,
+ # somewhat less elegant versions.
+
def get(self, key, default=None):
if key in self:
return self[key]
@@ -642,7 +648,7 @@
try:
key = next(iter(self.__items))
except StopIteration:
- raise KeyError("%s is empty" % self.__class__.__name__) from
None
+ raise KeyError("%s is empty" % type(self).__name__) from None
else:
return (key, self.pop(key))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/src/cachetools/_cached.py
new/cachetools-6.2.2/src/cachetools/_cached.py
--- old/cachetools-6.2.0/src/cachetools/_cached.py 2025-06-16
20:53:02.000000000 +0200
+++ new/cachetools-6.2.2/src/cachetools/_cached.py 2025-11-13
18:42:08.000000000 +0100
@@ -63,7 +63,9 @@
v = func(*args, **kwargs)
with lock:
try:
- # in case of a race, prefer the item already in the cache
+ # In case of a race condition, i.e. if another thread
+ # stored a value for this key while we were calling
+ # func(), prefer the cached value.
return cache.setdefault(k, v)
except ValueError:
return v # value too large
@@ -173,7 +175,7 @@
v = func(*args, **kwargs)
with lock:
try:
- # in case of a race, prefer the item already in the cache
+ # possible race condition: see above
return cache.setdefault(k, v)
except ValueError:
return v # value too large
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/src/cachetools/func.py
new/cachetools-6.2.2/src/cachetools/func.py
--- old/cachetools-6.2.0/src/cachetools/func.py 2025-08-24 15:50:41.000000000
+0200
+++ new/cachetools-6.2.2/src/cachetools/func.py 2025-11-13 17:43:41.000000000
+0100
@@ -92,6 +92,7 @@
"""Decorator to wrap a function with a memoizing callable that saves
up to `maxsize` results based on a Least Recently Used (LRU)
algorithm with a per-item time-to-live (TTL) value.
+
"""
if maxsize is None:
return _cache(_UnboundTTLCache(ttl, timer), None, typed)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/src/cachetools/keys.py
new/cachetools-6.2.2/src/cachetools/keys.py
--- old/cachetools-6.2.0/src/cachetools/keys.py 2025-06-16 20:53:02.000000000
+0200
+++ new/cachetools-6.2.2/src/cachetools/keys.py 2025-11-13 18:42:08.000000000
+0100
@@ -29,8 +29,8 @@
return {}
-# used for separating keyword arguments; we do not use an object
-# instance here so identity is preserved when pickling/unpickling
+# A sentinel for separating args from kwargs. Using the class itself
+# ensures uniqueness and preserves identity when pickling/unpickling.
_kwmark = (_HashedTuple,)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/cachetools-6.2.0/src/cachetools.egg-info/PKG-INFO
new/cachetools-6.2.2/src/cachetools.egg-info/PKG-INFO
--- old/cachetools-6.2.0/src/cachetools.egg-info/PKG-INFO 2025-08-25
20:57:19.000000000 +0200
+++ new/cachetools-6.2.2/src/cachetools.egg-info/PKG-INFO 2025-11-13
18:42:20.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: cachetools
-Version: 6.2.0
+Version: 6.2.2
Summary: Extensible memoizing collections and decorators
Home-page: https://github.com/tkem/cachetools/
Author: Thomas Kemmer
@@ -18,6 +18,7 @@
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
+Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
License-File: LICENSE
@@ -116,6 +117,7 @@
------------------------------------------------------------------------
- asyncache_: Helpers to use cachetools_ with asyncio.
+- cachetools-async_: Helpers to use cachetools_ with asyncio.
- cacheing_: Pure Python Cacheing Library.
- CacheToolsUtils_: Stackable cache classes for sharing, encryption,
statistics *and more* on top of cachetools_, redis_ and memcached_.
@@ -145,6 +147,7 @@
.. _MIT License: https://raw.github.com/tkem/cachetools/master/LICENSE
.. _asyncache: https://pypi.org/project/asyncache/
+.. _cachetools-async: https://pypi.org/project/cachetools-async/
.. _cacheing: https://pypi.org/project/cacheing/
.. _CacheToolsUtils: https://pypi.org/project/CacheToolsUtils/
.. _shelved-cache: https://pypi.org/project/shelved-cache/