Hello community, here is the log from the commit of package python-cachetools for openSUSE:Factory checked in at 2020-07-21 15:40:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cachetools (Old) and /work/SRC/openSUSE:Factory/.python-cachetools.new.3592 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cachetools" Tue Jul 21 15:40:01 2020 rev:10 rq:821426 version:4.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cachetools/python-cachetools.changes 2020-05-01 11:06:49.158994878 +0200 +++ /work/SRC/openSUSE:Factory/.python-cachetools.new.3592/python-cachetools.changes 2020-07-21 15:40:24.183527567 +0200 @@ -1,0 +2,7 @@ +Fri Jul 17 07:21:31 UTC 2020 - Dirk Mueller <dmuel...@suse.com> + +- update to 4.1.1: + - Improve ``popitem()`` exception context handling. + - Replace ``float('inf')`` with ``math.inf``. + +------------------------------------------------------------------- Old: ---- cachetools-4.1.0.tar.gz New: ---- cachetools-4.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cachetools.spec ++++++ --- /var/tmp/diff_new_pack.XD2yz4/_old 2020-07-21 15:40:25.267528996 +0200 +++ /var/tmp/diff_new_pack.XD2yz4/_new 2020-07-21 15:40:25.267528996 +0200 @@ -19,7 +19,7 @@ %define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-cachetools -Version: 4.1.0 +Version: 4.1.1 Release: 0 Summary: Extensible memoizing collections and decorators License: MIT ++++++ cachetools-4.1.0.tar.gz -> cachetools-4.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/CHANGELOG.rst new/cachetools-4.1.1/CHANGELOG.rst --- old/cachetools-4.1.0/CHANGELOG.rst 2020-04-08 13:32:37.000000000 +0200 +++ new/cachetools-4.1.1/CHANGELOG.rst 2020-06-28 21:27:11.000000000 +0200 @@ -1,3 +1,13 @@ +v4.1.1 (2020-06-28) +=================== + +- Improve ``popitem()`` exception context handling. + +- Replace ``float('inf')`` with ``math.inf``. + +- Improve "envkey" documentation example. + + v4.1.0 (2020-04-08) =================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/PKG-INFO new/cachetools-4.1.1/PKG-INFO --- old/cachetools-4.1.0/PKG-INFO 2020-04-08 13:34:37.000000000 +0200 +++ new/cachetools-4.1.1/PKG-INFO 2020-06-28 21:28:16.331040400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: cachetools -Version: 4.1.0 +Version: 4.1.1 Summary: Extensible memoizing collections and decorators Home-page: https://github.com/tkem/cachetools/ Author: Thomas Kemmer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/cachetools/__init__.py new/cachetools-4.1.1/cachetools/__init__.py --- old/cachetools-4.1.0/cachetools/__init__.py 2020-04-08 13:32:25.000000000 +0200 +++ new/cachetools-4.1.1/cachetools/__init__.py 2020-06-28 21:26:38.000000000 +0200 @@ -17,4 +17,4 @@ 'cachedmethod' ) -__version__ = '4.1.0' +__version__ = '4.1.1' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/cachetools/func.py new/cachetools-4.1.1/cachetools/func.py --- old/cachetools-4.1.0/cachetools/func.py 2020-04-08 13:32:25.000000000 +0200 +++ new/cachetools-4.1.1/cachetools/func.py 2020-06-28 21:26:38.000000000 +0200 @@ -2,6 +2,7 @@ import collections import functools +import math import random import time @@ -37,7 +38,7 @@ class _UnboundTTLCache(TTLCache): def __init__(self, ttl, timer): - TTLCache.__init__(self, float('inf'), ttl, timer) + TTLCache.__init__(self, math.inf, ttl, timer) @property def maxsize(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/cachetools/lfu.py new/cachetools-4.1.1/cachetools/lfu.py --- old/cachetools-4.1.0/cachetools/lfu.py 2019-12-27 00:02:07.000000000 +0100 +++ new/cachetools-4.1.1/cachetools/lfu.py 2020-06-28 21:26:38.000000000 +0200 @@ -28,6 +28,7 @@ try: (key, _), = self.__counter.most_common(1) except ValueError: - raise KeyError('%s is empty' % self.__class__.__name__) + msg = '%s is empty' % self.__class__.__name__ + raise KeyError(msg) from None else: return (key, self.pop(key)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/cachetools/lru.py new/cachetools-4.1.1/cachetools/lru.py --- old/cachetools-4.1.0/cachetools/lru.py 2019-12-27 00:02:07.000000000 +0100 +++ new/cachetools-4.1.1/cachetools/lru.py 2020-06-28 21:26:38.000000000 +0200 @@ -28,7 +28,8 @@ try: key = next(iter(self.__order)) except StopIteration: - raise KeyError('%s is empty' % self.__class__.__name__) + msg = '%s is empty' % self.__class__.__name__ + raise KeyError(msg) from None else: return (key, self.pop(key)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/cachetools/rr.py new/cachetools-4.1.1/cachetools/rr.py --- old/cachetools-4.1.0/cachetools/rr.py 2019-12-27 00:02:07.000000000 +0100 +++ new/cachetools-4.1.1/cachetools/rr.py 2020-06-28 21:26:38.000000000 +0200 @@ -29,6 +29,7 @@ try: key = self.__choice(list(self)) except IndexError: - raise KeyError('%s is empty' % self.__class__.__name__) + msg = '%s is empty' % self.__class__.__name__ + raise KeyError(msg) from None else: return (key, self.pop(key)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/cachetools/ttl.py new/cachetools-4.1.1/cachetools/ttl.py --- old/cachetools-4.1.0/cachetools/ttl.py 2020-04-01 11:36:38.000000000 +0200 +++ new/cachetools-4.1.1/cachetools/ttl.py 2020-06-28 21:26:38.000000000 +0200 @@ -198,7 +198,8 @@ try: key = next(iter(self.__links)) except StopIteration: - raise KeyError('%s is empty' % self.__class__.__name__) + msg = '%s is empty' % self.__class__.__name__ + raise KeyError(msg) from None else: return (key, self.pop(key)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/cachetools.egg-info/PKG-INFO new/cachetools-4.1.1/cachetools.egg-info/PKG-INFO --- old/cachetools-4.1.0/cachetools.egg-info/PKG-INFO 2020-04-08 13:34:37.000000000 +0200 +++ new/cachetools-4.1.1/cachetools.egg-info/PKG-INFO 2020-06-28 21:28:16.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: cachetools -Version: 4.1.0 +Version: 4.1.1 Summary: Extensible memoizing collections and decorators Home-page: https://github.com/tkem/cachetools/ Author: Thomas Kemmer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/docs/index.rst new/cachetools-4.1.1/docs/index.rst --- old/cachetools-4.1.0/docs/index.rst 2020-04-08 13:32:25.000000000 +0200 +++ new/cachetools-4.1.1/docs/index.rst 2020-06-28 21:26:38.000000000 +0200 @@ -405,6 +405,10 @@ like this:: @cached(LRUCache(maxsize=128), key=envkey) + def foo(x, y, z, env={}): + pass + + foo(1, 2, 3, env=dict(a='a', b='b')) **************************************************************************** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/setup.cfg new/cachetools-4.1.1/setup.cfg --- old/cachetools-4.1.0/setup.cfg 2020-04-08 13:34:37.000000000 +0200 +++ new/cachetools-4.1.1/setup.cfg 2020-06-28 21:28:16.331040400 +0200 @@ -1,6 +1,6 @@ [metadata] name = cachetools -version = 4.1.0 +version = 4.1.1 url = https://github.com/tkem/cachetools/ author = Thomas Kemmer author_email = tkem...@computer.org diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-4.1.0/tests/__init__.py new/cachetools-4.1.1/tests/__init__.py --- old/cachetools-4.1.0/tests/__init__.py 2019-04-10 19:41:37.000000000 +0200 +++ new/cachetools-4.1.1/tests/__init__.py 2020-06-28 21:26:38.000000000 +0200 @@ -1,3 +1,7 @@ +import sys +import unittest + + class CacheTestMixin(object): Cache = None @@ -104,6 +108,18 @@ with self.assertRaises(KeyError): cache.popitem() + @unittest.skipUnless(sys.version_info >= (3, 7), 'requires Python 3.7') + def test_popitem_exception_context(self): + # since Python 3.7, MutableMapping.popitem() suppresses + # exception context as implementation detail + exception = None + try: + self.Cache(maxsize=2).popitem() + except Exception as e: + exception = e + self.assertIsNone(exception.__cause__) + self.assertTrue(exception.__suppress_context__) + def _test_missing(self, cache): self.assertEqual(0, cache.currsize) self.assertEqual(2, cache.maxsize)