openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2019
- 1 participants
- 2210 discussions
Hello community,
here is the log from the commit of package python-cachetools for openSUSE:Factory checked in at 2019-02-28 21:44:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cachetools (Old)
and /work/SRC/openSUSE:Factory/.python-cachetools.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cachetools"
Thu Feb 28 21:44:24 2019 rev:6 rq:679937 version:3.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cachetools/python-cachetools.changes 2018-12-13 19:40:54.333276811 +0100
+++ /work/SRC/openSUSE:Factory/.python-cachetools.new.28833/python-cachetools.changes 2019-02-28 21:44:26.869498339 +0100
@@ -1,0 +2,14 @@
+Wed Feb 27 18:17:13 UTC 2019 - Thomas Bechtold <tbechtold(a)suse.com>
+
+- update to 3.1.0:
+ - Fix Python 3.8 compatibility issue.
+ - Use ``time.monotonic`` as default timer if available.
+ - Improve documentation regarding thread safety.
+ - Officially support Python 3.7.
+ - Drop Python 3.3 support (breaking change).
+ - Remove ``missing`` cache constructor parameter (breaking change).
+ - Remove ``self`` from ``@cachedmethod`` key arguments (breaking
+ change).
+ - Add support for ``maxsize=None`` in ``cachetools.func`` decorators.
+
+-------------------------------------------------------------------
Old:
----
cachetools-2.0.1.tar.gz
New:
----
cachetools-3.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cachetools.spec ++++++
--- /var/tmp/diff_new_pack.6dRJLh/_old 2019-02-28 21:44:28.085497820 +0100
+++ /var/tmp/diff_new_pack.6dRJLh/_new 2019-02-28 21:44:28.109497809 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-cachetools
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without test
Name: python-cachetools
-Version: 2.0.1
+Version: 3.1.0
Release: 0
Summary: Extensible memoizing collections and decorators
License: MIT
++++++ cachetools-2.0.1.tar.gz -> cachetools-3.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/CHANGES.rst new/cachetools-3.1.0/CHANGES.rst
--- old/cachetools-2.0.1/CHANGES.rst 2017-08-11 18:53:31.000000000 +0200
+++ new/cachetools-3.1.0/CHANGES.rst 2019-01-29 21:33:24.000000000 +0100
@@ -1,3 +1,40 @@
+v3.1.0 (2019-01-29)
+-------------------
+
+- Fix Python 3.8 compatibility issue.
+
+- Use ``time.monotonic`` as default timer if available.
+
+- Improve documentation regarding thread safety.
+
+
+v3.0.0 (2018-11-04)
+-------------------
+
+- Officially support Python 3.7.
+
+- Drop Python 3.3 support (breaking change).
+
+- Remove ``missing`` cache constructor parameter (breaking change).
+
+- Remove ``self`` from ``@cachedmethod`` key arguments (breaking
+ change).
+
+- Add support for ``maxsize=None`` in ``cachetools.func`` decorators.
+
+
+v2.1.0 (2018-05-12)
+-------------------
+
+- Deprecate ``missing`` cache constructor parameter.
+
+- Handle overridden ``getsizeof()`` method in subclasses.
+
+- Fix Python 2.7 ``RRCache`` pickling issues.
+
+- Various documentation improvements.
+
+
v2.0.1 (2017-08-11)
-------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/LICENSE new/cachetools-3.1.0/LICENSE
--- old/cachetools-2.0.1/LICENSE 2017-08-11 18:23:50.000000000 +0200
+++ new/cachetools-3.1.0/LICENSE 2019-01-29 21:31:04.000000000 +0100
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014-2017 Thomas Kemmer
+Copyright (c) 2014-2019 Thomas Kemmer
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/PKG-INFO new/cachetools-3.1.0/PKG-INFO
--- old/cachetools-2.0.1/PKG-INFO 2017-08-11 18:54:22.000000000 +0200
+++ new/cachetools-3.1.0/PKG-INFO 2019-01-29 21:46:18.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: cachetools
-Version: 2.0.1
+Version: 3.1.0
Summary: Extensible memoizing collections and decorators
Home-page: https://github.com/tkem/cachetools
Author: Thomas Kemmer
@@ -13,21 +13,26 @@
including variants of the Python 3 Standard Library `@lru_cache`_
function decorator.
- .. code-block:: pycon
+ .. code-block:: python
- >>> from cachetools import LRUCache
- >>> cache = LRUCache(maxsize=2)
- >>> cache.update([('first', 1), ('second', 2)])
- >>> cache
- LRUCache([('second', 2), ('first', 1)], maxsize=2, currsize=2)
- >>> cache['third'] = 3
- >>> cache
- LRUCache([('second', 2), ('third', 3)], maxsize=2, currsize=2)
- >>> cache['second']
- 2
- >>> cache['fourth'] = 4
- >>> cache
- LRUCache([('second', 2), ('fourth', 4)], maxsize=2, currsize=2)
+ from cachetools import cached, LRUCache, TTLCache
+
+ # speed up calculating Fibonacci numbers with dynamic programming
+ @cached(cache={})
+ def fib(n):
+ return n if n < 2 else fib(n - 1) + fib(n - 2)
+
+ # cache least recently used Python Enhancement Proposals
+ @cached(cache=LRUCache(maxsize=32))
+ def get_pep(num):
+ url = 'http://www.python.org/dev/peps/pep-%04d/' % num
+ with urllib.request.urlopen(url) as s:
+ return s.read()
+
+ # cache weather data for no longer than ten minutes
+ @cached(cache=TTLCache(maxsize=1024, ttl=600))
+ def get_weather(place):
+ return owm.weather_at_place(place).get_weather()
For the purpose of this module, a *cache* is a mutable_ mapping_ of a
fixed maximum size. When the cache is full, i.e. by adding another
@@ -81,7 +86,7 @@
License
------------------------------------------------------------------------
- Copyright (c) 2014-2017 Thomas Kemmer.
+ Copyright (c) 2014-2019 Thomas Kemmer.
Licensed under the `MIT License`_.
@@ -108,8 +113,10 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/README.rst new/cachetools-3.1.0/README.rst
--- old/cachetools-2.0.1/README.rst 2017-08-11 18:35:38.000000000 +0200
+++ new/cachetools-3.1.0/README.rst 2019-01-29 21:31:04.000000000 +0100
@@ -5,21 +5,26 @@
including variants of the Python 3 Standard Library `@lru_cache`_
function decorator.
-.. code-block:: pycon
+.. code-block:: python
- >>> from cachetools import LRUCache
- >>> cache = LRUCache(maxsize=2)
- >>> cache.update([('first', 1), ('second', 2)])
- >>> cache
- LRUCache([('second', 2), ('first', 1)], maxsize=2, currsize=2)
- >>> cache['third'] = 3
- >>> cache
- LRUCache([('second', 2), ('third', 3)], maxsize=2, currsize=2)
- >>> cache['second']
- 2
- >>> cache['fourth'] = 4
- >>> cache
- LRUCache([('second', 2), ('fourth', 4)], maxsize=2, currsize=2)
+ from cachetools import cached, LRUCache, TTLCache
+
+ # speed up calculating Fibonacci numbers with dynamic programming
+ @cached(cache={})
+ def fib(n):
+ return n if n < 2 else fib(n - 1) + fib(n - 2)
+
+ # cache least recently used Python Enhancement Proposals
+ @cached(cache=LRUCache(maxsize=32))
+ def get_pep(num):
+ url = 'http://www.python.org/dev/peps/pep-%04d/' % num
+ with urllib.request.urlopen(url) as s:
+ return s.read()
+
+ # cache weather data for no longer than ten minutes
+ @cached(cache=TTLCache(maxsize=1024, ttl=600))
+ def get_weather(place):
+ return owm.weather_at_place(place).get_weather()
For the purpose of this module, a *cache* is a mutable_ mapping_ of a
fixed maximum size. When the cache is full, i.e. by adding another
@@ -73,7 +78,7 @@
License
------------------------------------------------------------------------
-Copyright (c) 2014-2017 Thomas Kemmer.
+Copyright (c) 2014-2019 Thomas Kemmer.
Licensed under the `MIT License`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/cachetools/__init__.py new/cachetools-3.1.0/cachetools/__init__.py
--- old/cachetools-2.0.1/cachetools/__init__.py 2017-08-11 18:53:31.000000000 +0200
+++ new/cachetools-3.1.0/cachetools/__init__.py 2019-01-29 21:31:04.000000000 +0100
@@ -16,7 +16,7 @@
'cached', 'cachedmethod'
)
-__version__ = '2.0.1'
+__version__ = '3.1.0'
if hasattr(functools.update_wrapper(lambda f: f(), lambda: 42), '__wrapped__'):
_update_wrapper = functools.update_wrapper
@@ -79,7 +79,7 @@
c = cache(self)
if c is None:
return method(self, *args, **kwargs)
- k = key(self, *args, **kwargs)
+ k = key(*args, **kwargs)
try:
return c[k]
except KeyError:
@@ -95,7 +95,7 @@
c = cache(self)
if c is None:
return method(self, *args, **kwargs)
- k = key(self, *args, **kwargs)
+ k = key(*args, **kwargs)
try:
with lock(self):
return c[k]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/cachetools/abc.py new/cachetools-3.1.0/cachetools/abc.py
--- old/cachetools-2.0.1/cachetools/abc.py 2017-08-11 18:23:50.000000000 +0200
+++ new/cachetools-3.1.0/cachetools/abc.py 2019-01-29 21:31:04.000000000 +0100
@@ -1,11 +1,14 @@
from __future__ import absolute_import
-import collections
-
from abc import abstractmethod
+try:
+ from collections.abc import MutableMapping
+except ImportError:
+ from collections import MutableMapping
+
-class DefaultMapping(collections.MutableMapping):
+class DefaultMapping(MutableMapping):
__slots__ = ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/cachetools/cache.py new/cachetools-3.1.0/cachetools/cache.py
--- old/cachetools-2.0.1/cachetools/cache.py 2016-10-03 14:09:18.000000000 +0200
+++ new/cachetools-3.1.0/cachetools/cache.py 2018-11-04 20:58:27.000000000 +0100
@@ -19,11 +19,10 @@
__size = _DefaultSize()
- def __init__(self, maxsize, missing=None, getsizeof=None):
- if missing:
- self.__missing = missing
+ def __init__(self, maxsize, getsizeof=None):
if getsizeof:
- self.__getsizeof = getsizeof
+ self.getsizeof = getsizeof
+ if self.getsizeof is not Cache.getsizeof:
self.__size = dict()
self.__data = dict()
self.__currsize = 0
@@ -68,12 +67,7 @@
return key in self.__data
def __missing__(self, key):
- value = self.__missing(key)
- try:
- self.__setitem__(key, value)
- except ValueError:
- pass # value too large
- return value
+ raise KeyError(key)
def __iter__(self):
return iter(self.__data)
@@ -81,14 +75,6 @@
def __len__(self):
return len(self.__data)
- @staticmethod
- def __getsizeof(value):
- return 1
-
- @staticmethod
- def __missing(key):
- raise KeyError(key)
-
@property
def maxsize(self):
"""The maximum size of the cache."""
@@ -99,6 +85,7 @@
"""The current size of the cache."""
return self.__currsize
- def getsizeof(self, value):
+ @staticmethod
+ def getsizeof(value):
"""Return the size of a cache element's value."""
- return self.__getsizeof(value)
+ return 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/cachetools/func.py new/cachetools-3.1.0/cachetools/func.py
--- old/cachetools-2.0.1/cachetools/func.py 2016-10-03 14:09:18.000000000 +0200
+++ new/cachetools-3.1.0/cachetools/func.py 2019-01-29 21:31:04.000000000 +0100
@@ -5,11 +5,15 @@
import collections
import functools
import random
-import time
try:
- from threading import RLock
+ from time import monotonic as default_timer
except ImportError:
+ from time import time as default_timer
+
+try:
+ from threading import RLock
+except ImportError: # pragma: no cover
from dummy_threading import RLock
from . import keys
@@ -26,6 +30,24 @@
])
+class _UnboundCache(dict):
+
+ maxsize = None
+
+ @property
+ def currsize(self):
+ return len(self)
+
+
+class _UnboundTTLCache(TTLCache):
+ def __init__(self, ttl, timer):
+ TTLCache.__init__(self, float('inf'), ttl, timer)
+
+ @property
+ def maxsize(self):
+ return None
+
+
def _cache(cache, typed=False):
def decorator(func):
key = keys.typedkey if typed else keys.hashkey
@@ -77,7 +99,10 @@
algorithm.
"""
- return _cache(LFUCache(maxsize), typed)
+ if maxsize is None:
+ return _cache(_UnboundCache(), typed)
+ else:
+ return _cache(LFUCache(maxsize), typed)
def lru_cache(maxsize=128, typed=False):
@@ -86,7 +111,10 @@
algorithm.
"""
- return _cache(LRUCache(maxsize), typed)
+ if maxsize is None:
+ return _cache(_UnboundCache(), typed)
+ else:
+ return _cache(LRUCache(maxsize), typed)
def rr_cache(maxsize=128, choice=random.choice, typed=False):
@@ -95,12 +123,18 @@
algorithm.
"""
- return _cache(RRCache(maxsize, choice), typed)
+ if maxsize is None:
+ return _cache(_UnboundCache(), typed)
+ else:
+ return _cache(RRCache(maxsize, choice), typed)
-def ttl_cache(maxsize=128, ttl=600, timer=time.time, typed=False):
+def ttl_cache(maxsize=128, ttl=600, timer=default_timer, typed=False):
"""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.
"""
- return _cache(TTLCache(maxsize, ttl, timer), typed)
+ if maxsize is None:
+ return _cache(_UnboundTTLCache(ttl, timer), typed)
+ else:
+ return _cache(TTLCache(maxsize, ttl, timer), typed)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/cachetools/lfu.py new/cachetools-3.1.0/cachetools/lfu.py
--- old/cachetools-2.0.1/cachetools/lfu.py 2016-10-03 14:09:18.000000000 +0200
+++ new/cachetools-3.1.0/cachetools/lfu.py 2018-11-04 20:58:27.000000000 +0100
@@ -8,8 +8,8 @@
class LFUCache(Cache):
"""Least Frequently Used (LFU) cache implementation."""
- def __init__(self, maxsize, missing=None, getsizeof=None):
- Cache.__init__(self, maxsize, missing, getsizeof)
+ def __init__(self, maxsize, getsizeof=None):
+ Cache.__init__(self, maxsize, getsizeof)
self.__counter = collections.Counter()
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/cachetools/lru.py new/cachetools-3.1.0/cachetools/lru.py
--- old/cachetools-2.0.1/cachetools/lru.py 2016-10-03 14:09:18.000000000 +0200
+++ new/cachetools-3.1.0/cachetools/lru.py 2018-11-04 20:58:27.000000000 +0100
@@ -8,8 +8,8 @@
class LRUCache(Cache):
"""Least Recently Used (LRU) cache implementation."""
- def __init__(self, maxsize, missing=None, getsizeof=None):
- Cache.__init__(self, maxsize, missing, getsizeof)
+ def __init__(self, maxsize, getsizeof=None):
+ Cache.__init__(self, maxsize, getsizeof)
self.__order = collections.OrderedDict()
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/cachetools/rr.py new/cachetools-3.1.0/cachetools/rr.py
--- old/cachetools-2.0.1/cachetools/rr.py 2016-10-03 14:09:18.000000000 +0200
+++ new/cachetools-3.1.0/cachetools/rr.py 2018-11-04 20:58:27.000000000 +0100
@@ -5,13 +5,21 @@
from .cache import Cache
+# random.choice cannot be pickled in Python 2.7
+def _choice(seq):
+ return random.choice(seq)
+
+
class RRCache(Cache):
"""Random Replacement (RR) cache implementation."""
- def __init__(self, maxsize, choice=random.choice, missing=None,
- getsizeof=None):
- Cache.__init__(self, maxsize, missing, getsizeof)
- self.__choice = choice
+ def __init__(self, maxsize, choice=random.choice, getsizeof=None):
+ Cache.__init__(self, maxsize, getsizeof)
+ # TODO: use None as default, assing to self.choice directly?
+ if choice is random.choice:
+ self.__choice = _choice
+ else:
+ self.__choice = choice
@property
def choice(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/cachetools/ttl.py new/cachetools-3.1.0/cachetools/ttl.py
--- old/cachetools-2.0.1/cachetools/ttl.py 2016-10-03 14:09:18.000000000 +0200
+++ new/cachetools-3.1.0/cachetools/ttl.py 2019-01-29 21:31:04.000000000 +0100
@@ -1,7 +1,11 @@
from __future__ import absolute_import
import collections
-import time
+
+try:
+ from time import monotonic as default_timer
+except ImportError:
+ from time import time as default_timer
from .cache import Cache
@@ -57,9 +61,8 @@
class TTLCache(Cache):
"""LRU Cache implementation with per-item time-to-live (TTL) value."""
- def __init__(self, maxsize, ttl, timer=time.time, missing=None,
- getsizeof=None):
- Cache.__init__(self, maxsize, missing, getsizeof)
+ def __init__(self, maxsize, ttl, timer=default_timer, getsizeof=None):
+ Cache.__init__(self, maxsize, getsizeof)
self.__root = root = _Link()
root.prev = root.next = root
self.__links = collections.OrderedDict()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/cachetools.egg-info/PKG-INFO new/cachetools-3.1.0/cachetools.egg-info/PKG-INFO
--- old/cachetools-2.0.1/cachetools.egg-info/PKG-INFO 2017-08-11 18:54:22.000000000 +0200
+++ new/cachetools-3.1.0/cachetools.egg-info/PKG-INFO 2019-01-29 21:46:18.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: cachetools
-Version: 2.0.1
+Version: 3.1.0
Summary: Extensible memoizing collections and decorators
Home-page: https://github.com/tkem/cachetools
Author: Thomas Kemmer
@@ -13,21 +13,26 @@
including variants of the Python 3 Standard Library `@lru_cache`_
function decorator.
- .. code-block:: pycon
+ .. code-block:: python
- >>> from cachetools import LRUCache
- >>> cache = LRUCache(maxsize=2)
- >>> cache.update([('first', 1), ('second', 2)])
- >>> cache
- LRUCache([('second', 2), ('first', 1)], maxsize=2, currsize=2)
- >>> cache['third'] = 3
- >>> cache
- LRUCache([('second', 2), ('third', 3)], maxsize=2, currsize=2)
- >>> cache['second']
- 2
- >>> cache['fourth'] = 4
- >>> cache
- LRUCache([('second', 2), ('fourth', 4)], maxsize=2, currsize=2)
+ from cachetools import cached, LRUCache, TTLCache
+
+ # speed up calculating Fibonacci numbers with dynamic programming
+ @cached(cache={})
+ def fib(n):
+ return n if n < 2 else fib(n - 1) + fib(n - 2)
+
+ # cache least recently used Python Enhancement Proposals
+ @cached(cache=LRUCache(maxsize=32))
+ def get_pep(num):
+ url = 'http://www.python.org/dev/peps/pep-%04d/' % num
+ with urllib.request.urlopen(url) as s:
+ return s.read()
+
+ # cache weather data for no longer than ten minutes
+ @cached(cache=TTLCache(maxsize=1024, ttl=600))
+ def get_weather(place):
+ return owm.weather_at_place(place).get_weather()
For the purpose of this module, a *cache* is a mutable_ mapping_ of a
fixed maximum size. When the cache is full, i.e. by adding another
@@ -81,7 +86,7 @@
License
------------------------------------------------------------------------
- Copyright (c) 2014-2017 Thomas Kemmer.
+ Copyright (c) 2014-2019 Thomas Kemmer.
Licensed under the `MIT License`_.
@@ -108,8 +113,10 @@
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/docs/conf.py new/cachetools-3.1.0/docs/conf.py
--- old/cachetools-2.0.1/docs/conf.py 2017-08-11 18:23:50.000000000 +0200
+++ new/cachetools-3.1.0/docs/conf.py 2019-01-29 21:31:04.000000000 +0100
@@ -6,7 +6,7 @@
project = 'cachetools'
-copyright = '2014-2017 Thomas Kemmer'
+copyright = '2014-2019 Thomas Kemmer'
version = get_version(b'../cachetools/__init__.py')
release = version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/docs/index.rst new/cachetools-3.1.0/docs/index.rst
--- old/cachetools-2.0.1/docs/index.rst 2017-08-11 18:23:50.000000000 +0200
+++ new/cachetools-3.1.0/docs/index.rst 2019-01-29 21:31:04.000000000 +0100
@@ -22,6 +22,15 @@
calls are provided, too.
+.. testsetup:: *
+
+ import operator
+ from cachetools import cached, cachedmethod, LRUCache
+
+ import mock
+ urllib = mock.MagicMock()
+
+
Cache implementations
------------------------------------------------------------------------
@@ -30,37 +39,9 @@
:class:`Cache`, which in turn derives from
:class:`collections.MutableMapping`, and provide :attr:`maxsize` and
:attr:`currsize` properties to retrieve the maximum and current size
-of the cache. When a cache is full, :meth:`setitem` calls
-:meth:`popitem` repeatedly until there is enough room for the item to
-be added.
-
-All cache classes accept an optional `missing` keyword argument in
-their constructor, which can be used to provide a default *factory
-function*. If the key `key` is not present, the ``cache[key]``
-operation calls :meth:`Cache.__missing__`, which in turn calls
-`missing` with `key` as its sole argument. The cache will then store
-the object returned from ``missing(key)`` as the new cache value for
-`key`, possibly discarding other items if the cache is full. This may
-be used to provide memoization for existing single-argument functions::
-
- from cachetools import LRUCache
- import urllib.request
-
- def get_pep(num):
- """Retrieve text of a Python Enhancement Proposal"""
- url = 'http://www.python.org/dev/peps/pep-%04d/' % num
- with urllib.request.urlopen(url) as s:
- return s.read()
-
- cache = LRUCache(maxsize=4, missing=get_pep)
-
- for n in 8, 9, 290, 308, 320, 8, 218, 320, 279, 289, 320, 9991:
- try:
- print(n, len(cache[n]))
- except urllib.error.HTTPError:
- print(n, 'Not Found')
- print(sorted(cache.keys()))
-
+of the cache. When a cache is full, :meth:`Cache.__setitem__()` calls
+:meth:`self.popitem()` repeatedly until there is enough room for the
+item to be added.
:class:`Cache` also features a :meth:`getsizeof` method, which returns
the size of a given `value`. The default implementation of
@@ -70,7 +51,14 @@
named constructor parameter `getsizeof`, which may specify a function
of one argument used to retrieve the size of an item's value.
-.. autoclass:: Cache
+.. note::
+
+ Please be aware that all these classes are *not* thread-safe.
+ Access to a shared cache from multiple threads must be properly
+ synchronized, e.g. by using one of the memoizing decorators with a
+ suitable `lock` object.
+
+.. autoclass:: Cache(maxsize, getsizeof=None)
:members:
This class discards arbitrary items using :meth:`popitem` to make
@@ -78,25 +66,21 @@
to implement specific caching strategies. If a subclass has to
keep track of item access, insertion or deletion, it may
additionally need to override :meth:`__getitem__`,
- :meth:`__setitem__` and :meth:`__delitem__`. If a subclass wants
- to store meta data with its values, i.e. the `value` argument
- passed to :meth:`Cache.__setitem__` is different from what the
- derived class's :meth:`__setitem__` received, it will probably need
- to override :meth:`getsizeof`, too.
+ :meth:`__setitem__` and :meth:`__delitem__`.
-.. autoclass:: LFUCache
+.. autoclass:: LFUCache(maxsize, getsizeof=None)
:members:
This class counts how often an item is retrieved, and discards the
items used least often to make space when necessary.
-.. autoclass:: LRUCache
+.. autoclass:: LRUCache(maxsize, getsizeof=None)
:members:
This class discards the least recently used items first to make
space when necessary.
-.. autoclass:: RRCache(maxsize, choice=random.choice, missing=None, getsizeof=None)
+.. autoclass:: RRCache(maxsize, choice=random.choice, getsizeof=None)
:members:
This class randomly selects candidate items and discards them to
@@ -107,32 +91,86 @@
an alternative function that returns an arbitrary element from a
non-empty sequence.
-.. autoclass:: TTLCache(maxsize, ttl, timer=time.time, missing=None, getsizeof=None)
- :members:
- :exclude-members: expire
+.. autoclass:: TTLCache(maxsize, ttl, timer=time.monotonic, getsizeof=None)
+ :members: popitem, timer, ttl
This class associates a time-to-live value with each item. Items
that expire because they have exceeded their time-to-live will be
- removed automatically. If no expired items are there to remove,
- the least recently used items will be discarded first to make space
- when necessary. Trying to access an expired item will raise a
- :exc:`KeyError`.
-
- By default, the time-to-live is specified in seconds, and the
- :func:`time.time` function is used to retrieve the current time. A
- custom `timer` function can be supplied if needed.
-
- .. automethod:: expire(self, time=None)
-
- Since expired items will be "physically" removed from a cache
- only at the next mutating operation, e.g. :meth:`__setitem__` or
- :meth:`__delitem__`, to avoid changing the underlying dictionary
- while iterating over it, expired items may still claim memory
- although they are no longer accessible. Calling this method
- removes all items whose time-to-live would have expired by
- `time`, so garbage collection is free to reuse their memory. If
- `time` is :const:`None`, this removes all items that have
- expired by the current value returned by :attr:`timer`.
+ no longer accessible, and will be removed eventually. If no
+ expired items are there to remove, the least recently used items
+ will be discarded first to make space when necessary.
+
+ By default, the time-to-live is specified in seconds and
+ :func:`time.monotonic` is used to retrieve the current time. If
+ :func:`time.monotonic` is not available, e.g. when running Python
+ 2.7, :func:`time.time` will be used. A custom `timer` function can
+ be supplied if needed.
+
+ .. method:: expire(self, time=None)
+
+ Expired items will be removed from a cache only at the next
+ mutating operation, e.g. :meth:`__setitem__` or
+ :meth:`__delitem__`, and therefore may still claim memory.
+ Calling this method removes all items whose time-to-live would
+ have expired by `time`, so garbage collection is free to reuse
+ their memory. If `time` is :const:`None`, this removes all
+ items that have expired by the current value returned by
+ :attr:`timer`.
+
+
+Extending cache classes
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Sometimes it may be desirable to notice when and what cache items are
+evicted, i.e. removed from a cache to make room for new items. Since
+all cache implementations call :meth:`popitem` to evict items from the
+cache, this can be achieved by overriding this method in a subclass:
+
+.. doctest::
+ :pyversion: >= 3
+
+ >>> class MyCache(LRUCache):
+ ... def popitem(self):
+ ... key, value = super().popitem()
+ ... print('Key "%s" evicted with value "%s"' % (key, value))
+ ... return key, value
+
+ >>> c = MyCache(maxsize=2)
+ >>> c['a'] = 1
+ >>> c['b'] = 2
+ >>> c['c'] = 3
+ Key "a" evicted with value "1"
+
+Similar to the standard library's :class:`collections.defaultdict`,
+subclasses of :class:`Cache` may implement a :meth:`__missing__`
+method which is called by :meth:`Cache.__getitem__` if the requested
+key is not found:
+
+.. doctest::
+ :pyversion: >= 3
+
+ >>> class PepStore(LRUCache):
+ ... def __missing__(self, key):
+ ... """Retrieve text of a Python Enhancement Proposal"""
+ ... url = 'http://www.python.org/dev/peps/pep-%04d/' % key
+ ... try:
+ ... with urllib.request.urlopen(url) as s:
+ ... pep = s.read()
+ ... self[key] = pep # store text in cache
+ ... return pep
+ ... except urllib.error.HTTPError:
+ ... return 'Not Found' # do not store in cache
+
+ >>> peps = PepStore(maxsize=4)
+ >>> for n in 8, 9, 290, 308, 320, 8, 218, 320, 279, 289, 320:
+ ... pep = peps[n]
+ >>> print(sorted(peps.keys()))
+ [218, 279, 289, 320]
+
+Note, though, that such a class does not really behave like a *cache*
+any more, and will lead to surprising results when used with any of
+the memoizing decorators described below. However, it may be useful
+in its own right.
Memoizing decorators
@@ -140,16 +178,17 @@
The :mod:`cachetools` module provides decorators for memoizing
function and method calls. This can save time when a function is
-often called with the same arguments::
+often called with the same arguments:
- from cachetools import cached
+.. doctest::
- @cached(cache={})
- def fib(n):
- return n if n < 2 else fib(n - 1) + fib(n - 2)
+ >>> @cached(cache={})
+ ... def fib(n):
+ ... 'Compute the nth number in the Fibonacci sequence'
+ ... return n if n < 2 else fib(n - 1) + fib(n - 2)
- for i in range(100):
- print('fib(%d) = %d' % (i, fib(i)))
+ >>> fib(42)
+ 267914296
.. decorator:: cached(cache, key=cachetools.keys.hashkey, lock=None)
@@ -189,44 +228,56 @@
cache during runtime, the cache should be assigned to a variable.
When a `lock` object is used, any access to the cache from outside
the function wrapper should also be performed within an appropriate
- `with` statement::
+ `with` statement:
+
+ .. testcode::
- from threading import RLock
- from cachetools import cached, LRUCache
+ from threading import RLock
- cache = LRUCache(maxsize=100)
- lock = RLock()
+ cache = LRUCache(maxsize=32)
+ lock = RLock()
- @cached(cache, lock=lock)
- def fib(n):
- return n if n < 2 else fib(n - 1) + fib(n - 2)
+ @cached(cache, lock=lock)
+ def get_pep(num):
+ 'Retrieve text of a Python Enhancement Proposal'
+ url = 'http://www.python.org/dev/peps/pep-%04d/' % num
+ with urllib.request.urlopen(url) as s:
+ return s.read()
- # make sure access to cache is synchronized
- with lock:
- cache.clear()
+ # make sure access to cache is synchronized
+ with lock:
+ cache.clear()
It is also possible to use a single shared cache object with
multiple functions. However, care must be taken that different
cache keys are generated for each function, even for identical
- function arguments::
+ function arguments:
- from functools import partial
- from cachetools import cached, LRUCache
- from cachetools.keys import hashkey
+ .. doctest::
+ :options: +ELLIPSIS
- cache = LRUCache(maxsize=100)
+ >>> from cachetools.keys import hashkey
+ >>> from functools import partial
- @cached(cache, key=partial(hashkey, 'fib'))
- def fib(n):
- return n if n < 2 else fib(n - 1) + fib(n - 2)
-
- @cached(cache, key=partial(hashkey, 'fac'))
- def fac(n):
- return 1 if n == 0 else n * fac(n - 1)
-
- print(fib(42))
- print(fac(42))
- print(cache)
+ >>> # shared cache for integer sequences
+ >>> numcache = {}
+
+ >>> # compute Fibonacci numbers
+ >>> @cached(numcache, key=partial(hashkey, 'fib'))
+ ... def fib(n):
+ ... return n if n < 2 else fib(n - 1) + fib(n - 2)
+
+ >>> # compute Lucas numbers
+ >>> @cached(numcache, key=partial(hashkey, 'luc'))
+ ... def luc(n):
+ ... return 2 - n if n < 2 else luc(n - 1) + luc(n - 2)
+
+ >>> fib(42)
+ 267914296
+ >>> luc(42)
+ 599074578
+ >>> list(sorted(numcache.items()))
+ [..., (('fib', 42), 267914296), ..., (('luc', 42), 599074578)]
.. decorator:: cachedmethod(cache, key=cachetools.keys.hashkey, lock=None)
@@ -248,27 +299,30 @@
One advantage of :func:`cachedmethod` over the :func:`cached`
function decorator is that cache properties such as `maxsize` can
- be set at runtime::
+ be set at runtime:
+
+ .. testcode::
- import operator
- import urllib.request
+ class CachedPEPs(object):
- from cachetools import LRUCache, cachedmethod
+ def __init__(self, cachesize):
+ self.cache = LRUCache(maxsize=cachesize)
- class CachedPEPs(object):
+ @cachedmethod(operator.attrgetter('cache'))
+ def get(self, num):
+ """Retrieve text of a Python Enhancement Proposal"""
+ url = 'http://www.python.org/dev/peps/pep-%04d/' % num
+ with urllib.request.urlopen(url) as s:
+ return s.read()
- def __init__(self, cachesize):
- self.cache = LRUCache(maxsize=cachesize)
+ peps = CachedPEPs(cachesize=10)
+ print("PEP #1: %s" % peps.get(1))
- @cachedmethod(operator.attrgetter('cache'))
- def get(self, num):
- """Retrieve text of a Python Enhancement Proposal"""
- url = 'http://www.python.org/dev/peps/pep-%04d/' % num
- with urllib.request.urlopen(url) as s:
- return s.read()
+ .. testoutput::
+ :hide:
+ :options: +ELLIPSIS
- peps = CachedPEPs(cachesize=10)
- print("PEP #1: %s" % peps.get(1))
+ PEP #1: ...
:mod:`cachetools.keys` --- Key functions for memoizing decorators
@@ -306,7 +360,7 @@
def envkey(*args, env={}, **kwargs):
key = hashkey(*args, **kwargs)
- key += tuple(env.items())
+ key += tuple(sorted(env.items()))
return key
The :func:`envkey` function can then be used in decorator declarations
@@ -324,9 +378,9 @@
this module provides several memoizing function decorators with a
similar API. All these decorators wrap a function with a memoizing
callable that saves up to the `maxsize` most recent calls, using
-different caching strategies. Note that unlike
-:func:`functools.lru_cache`, setting `maxsize` to :const:`None` is not
-supported.
+different caching strategies. If `maxsize` is set to :const:`None`,
+the caching strategy is effectively disabled and the cache can grow
+without bound.
If the optional argument `typed` is set to :const:`True`, function
arguments of different types will be cached separately. For example,
@@ -335,8 +389,9 @@
The wrapped function is instrumented with :func:`cache_info` and
:func:`cache_clear` functions to provide information about cache
-performance and clear the cache. See the :func:`functools.lru_cache`
-documentation for details.
+performance and clear the cache. Please see the
+:func:`functools.lru_cache` documentation for details. Also note that
+all the decorators in this module are thread-safe by default.
.. decorator:: lfu_cache(maxsize=128, typed=False)
@@ -356,7 +411,7 @@
saves up to `maxsize` results based on a Random Replacement (RR)
algorithm.
-.. decorator:: ttl_cache(maxsize=128, ttl=600, timer=time.time, typed=False)
+.. decorator:: ttl_cache(maxsize=128, ttl=600, timer=time.monotonic, typed=False)
Decorator to wrap a function with a memoizing callable that saves
up to `maxsize` results based on a Least Recently Used (LRU)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/setup.py new/cachetools-3.1.0/setup.py
--- old/cachetools-2.0.1/setup.py 2017-08-11 18:41:40.000000000 +0200
+++ new/cachetools-3.1.0/setup.py 2018-11-04 20:58:27.000000000 +0100
@@ -29,10 +29,12 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: Implementation :: CPython',
+ 'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/tests/__init__.py new/cachetools-3.1.0/tests/__init__.py
--- old/cachetools-2.0.1/tests/__init__.py 2016-04-22 15:03:41.000000000 +0200
+++ new/cachetools-3.1.0/tests/__init__.py 2018-11-04 20:58:27.000000000 +0100
@@ -1,10 +1,9 @@
class CacheTestMixin(object):
- def cache(self, maxsize, missing=None, getsizeof=None):
- raise NotImplementedError
+ Cache = None
- def test_cache_defaults(self):
- cache = self.cache(maxsize=1)
+ def test_defaults(self):
+ cache = self.Cache(maxsize=1)
self.assertEqual(0, len(cache))
self.assertEqual(1, cache.maxsize)
self.assertEqual(0, cache.currsize)
@@ -13,8 +12,8 @@
self.assertEqual(1, cache.getsizeof(0))
self.assertTrue(repr(cache).startswith(cache.__class__.__name__))
- def test_cache_insert(self):
- cache = self.cache(maxsize=2)
+ def test_insert(self):
+ cache = self.Cache(maxsize=2)
cache.update({1: 1, 2: 2})
self.assertEqual(2, len(cache))
@@ -31,8 +30,8 @@
self.assertEqual(4, cache[4])
self.assertTrue(1 in cache or 2 in cache or 3 in cache)
- def test_cache_update(self):
- cache = self.cache(maxsize=2)
+ def test_update(self):
+ cache = self.Cache(maxsize=2)
cache.update({1: 1, 2: 2})
self.assertEqual(2, len(cache))
@@ -49,8 +48,8 @@
self.assertEqual('a', cache[1])
self.assertEqual('b', cache[2])
- def test_cache_delete(self):
- cache = self.cache(maxsize=2)
+ def test_delete(self):
+ cache = self.Cache(maxsize=2)
cache.update({1: 1, 2: 2})
self.assertEqual(2, len(cache))
@@ -73,8 +72,8 @@
self.assertNotIn(1, cache)
self.assertNotIn(2, cache)
- def test_cache_pop(self):
- cache = self.cache(maxsize=2)
+ def test_pop(self):
+ cache = self.Cache(maxsize=2)
cache.update({1: 1, 2: 2})
self.assertEqual(2, cache.pop(2))
@@ -93,8 +92,8 @@
self.assertEqual(None, cache.pop(1, None))
self.assertEqual(None, cache.pop(0, None))
- def test_cache_popitem(self):
- cache = self.cache(maxsize=2)
+ def test_popitem(self):
+ cache = self.Cache(maxsize=2)
cache.update({1: 1, 2: 2})
self.assertIn(cache.pop(1), {1: 1, 2: 2})
@@ -105,9 +104,9 @@
with self.assertRaises(KeyError):
cache.popitem()
- def test_cache_missing(self):
- cache = self.cache(maxsize=2, missing=lambda x: x)
-
+ def _test_missing(self, cache):
+ self.assertEqual(0, cache.currsize)
+ self.assertEqual(2, cache.maxsize)
self.assertEqual(0, len(cache))
self.assertEqual(1, cache[1])
self.assertEqual(2, cache[2])
@@ -157,8 +156,9 @@
self.assertTrue(1 in cache or 2 in cache)
self.assertTrue(1 not in cache or 2 not in cache)
- cache = self.cache(maxsize=2, missing=lambda x: x,
- getsizeof=lambda x: x)
+ def _test_missing_getsizeof(self, cache):
+ self.assertEqual(0, cache.currsize)
+ self.assertEqual(2, cache.maxsize)
self.assertEqual(1, cache[1])
self.assertIn(1, cache)
self.assertEqual(2, cache[2])
@@ -169,10 +169,21 @@
self.assertIn(2, cache)
self.assertNotIn(3, cache)
- def test_cache_getsizeof(self):
- cache = self.cache(maxsize=3, getsizeof=lambda x: x)
- self.assertEqual(3, cache.maxsize)
+ def test_missing_subclass(self):
+ class Cache(self.Cache):
+ def __missing__(self, key):
+ try:
+ self[key] = key
+ except ValueError:
+ pass
+ return key
+
+ self._test_missing(Cache(maxsize=2))
+ self._test_missing_getsizeof(Cache(maxsize=2, getsizeof=lambda x: x))
+
+ def _test_getsizeof(self, cache):
self.assertEqual(0, cache.currsize)
+ self.assertEqual(3, cache.maxsize)
self.assertEqual(1, cache.getsizeof(1))
self.assertEqual(2, cache.getsizeof(2))
self.assertEqual(3, cache.getsizeof(3))
@@ -214,10 +225,20 @@
self.assertEqual(3, cache.currsize)
self.assertEqual(3, cache[3])
- def test_cache_pickle(self):
+ def test_getsizeof_param(self):
+ self._test_getsizeof(self.Cache(maxsize=3, getsizeof=lambda x: x))
+
+ def test_getsizeof_subclass(self):
+ class Cache(self.Cache):
+ def getsizeof(self, value):
+ return value
+
+ self._test_getsizeof(Cache(maxsize=3))
+
+ def test_pickle(self):
import pickle
- source = self.cache(maxsize=2)
+ source = self.Cache(maxsize=2)
source.update({1: 1, 2: 2})
cache = pickle.loads(pickle.dumps(source))
@@ -239,13 +260,13 @@
self.assertEqual(cache, pickle.loads(pickle.dumps(cache)))
- def test_cache_pickle_maxsize(self):
+ def test_pickle_maxsize(self):
import pickle
import sys
# test empty cache, single element, large cache (recursion limit)
for n in [0, 1, sys.getrecursionlimit() * 2]:
- source = self.cache(maxsize=n)
+ source = self.Cache(maxsize=n)
source.update((i, i) for i in range(n))
cache = pickle.loads(pickle.dumps(source))
self.assertEqual(n, len(cache))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/tests/test_cache.py new/cachetools-3.1.0/tests/test_cache.py
--- old/cachetools-2.0.1/tests/test_cache.py 2016-04-22 15:03:41.000000000 +0200
+++ new/cachetools-3.1.0/tests/test_cache.py 2018-11-04 20:58:27.000000000 +0100
@@ -1,11 +1,10 @@
import unittest
-from cachetools import Cache
+import cachetools
from . import CacheTestMixin
class CacheTest(unittest.TestCase, CacheTestMixin):
- def cache(self, maxsize, missing=None, getsizeof=None):
- return Cache(maxsize, missing=missing, getsizeof=getsizeof)
+ Cache = cachetools.Cache
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/tests/test_func.py new/cachetools-3.1.0/tests/test_func.py
--- old/cachetools-2.0.1/tests/test_func.py 2016-10-03 14:09:18.000000000 +0200
+++ new/cachetools-3.1.0/tests/test_func.py 2018-11-04 20:58:27.000000000 +0100
@@ -30,7 +30,7 @@
self.assertEqual(cached(1), 1)
self.assertEqual(cached.cache_info(), (0, 1, 2, 1))
- def test_decorator_nosize(self):
+ def test_decorator_nocache(self):
cached = self.decorator(maxsize=0)(lambda n: n)
self.assertEqual(cached.cache_info(), (0, 0, 0, 0))
@@ -41,6 +41,17 @@
self.assertEqual(cached(1.0), 1.0)
self.assertEqual(cached.cache_info(), (0, 3, 0, 0))
+ def test_decorator_unbound(self):
+ cached = self.decorator(maxsize=None)(lambda n: n)
+
+ self.assertEqual(cached.cache_info(), (0, 0, None, 0))
+ self.assertEqual(cached(1), 1)
+ self.assertEqual(cached.cache_info(), (0, 1, None, 1))
+ self.assertEqual(cached(1), 1)
+ self.assertEqual(cached.cache_info(), (1, 1, None, 1))
+ self.assertEqual(cached(1.0), 1.0)
+ self.assertEqual(cached.cache_info(), (2, 1, None, 1))
+
def test_decorator_typed(self):
cached = self.decorator(maxsize=2, typed=True)(lambda n: n)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/tests/test_lfu.py new/cachetools-3.1.0/tests/test_lfu.py
--- old/cachetools-2.0.1/tests/test_lfu.py 2016-04-22 15:03:41.000000000 +0200
+++ new/cachetools-3.1.0/tests/test_lfu.py 2018-11-04 20:58:27.000000000 +0100
@@ -7,11 +7,10 @@
class LFUCacheTest(unittest.TestCase, CacheTestMixin):
- def cache(self, maxsize, missing=None, getsizeof=None):
- return LFUCache(maxsize, missing=missing, getsizeof=getsizeof)
+ Cache = LFUCache
def test_lfu(self):
- cache = self.cache(maxsize=2)
+ cache = LFUCache(maxsize=2)
cache[1] = 1
cache[1]
@@ -29,7 +28,7 @@
self.assertEqual(cache[1], 1)
def test_lfu_getsizeof(self):
- cache = self.cache(maxsize=3, getsizeof=lambda x: x)
+ cache = LFUCache(maxsize=3, getsizeof=lambda x: x)
cache[1] = 1
cache[2] = 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/tests/test_lru.py new/cachetools-3.1.0/tests/test_lru.py
--- old/cachetools-2.0.1/tests/test_lru.py 2016-04-22 15:03:41.000000000 +0200
+++ new/cachetools-3.1.0/tests/test_lru.py 2018-11-04 20:58:27.000000000 +0100
@@ -7,11 +7,10 @@
class LRUCacheTest(unittest.TestCase, CacheTestMixin):
- def cache(self, maxsize, missing=None, getsizeof=None):
- return LRUCache(maxsize, missing=missing, getsizeof=getsizeof)
+ Cache = LRUCache
def test_lru(self):
- cache = self.cache(maxsize=2)
+ cache = LRUCache(maxsize=2)
cache[1] = 1
cache[2] = 2
@@ -36,7 +35,7 @@
self.assertNotIn(2, cache)
def test_lru_getsizeof(self):
- cache = self.cache(maxsize=3, getsizeof=lambda x: x)
+ cache = LRUCache(maxsize=3, getsizeof=lambda x: x)
cache[1] = 1
cache[2] = 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/tests/test_method.py new/cachetools-3.1.0/tests/test_method.py
--- old/cachetools-2.0.1/tests/test_method.py 2016-10-03 14:09:18.000000000 +0200
+++ new/cachetools-3.1.0/tests/test_method.py 2018-11-04 20:58:27.000000000 +0100
@@ -22,6 +22,10 @@
self.count += 1
return count
+ # https://github.com/tkem/cachetools/issues/107
+ def __hash__(self):
+ raise TypeError('unhashable type')
+
class Locked(object):
@@ -109,6 +113,7 @@
def test_weakref(self):
import weakref
import fractions
+ import gc
# in Python 3.4, `int` does not support weak references even
# when subclassed, but Fraction apparently does...
@@ -119,6 +124,7 @@
cached = Cached(weakref.WeakValueDictionary(), count=Int(0))
self.assertEqual(cached.get(0), 0)
+ gc.collect()
self.assertEqual(cached.get(0), 1)
ref = cached.get(1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/tests/test_rr.py new/cachetools-3.1.0/tests/test_rr.py
--- old/cachetools-2.0.1/tests/test_rr.py 2016-04-22 15:03:41.000000000 +0200
+++ new/cachetools-3.1.0/tests/test_rr.py 2018-11-04 20:58:27.000000000 +0100
@@ -1,4 +1,3 @@
-import random
import unittest
from cachetools import RRCache
@@ -6,19 +5,12 @@
from . import CacheTestMixin
-# random.choice cannot be pickled...
-def choice(seq):
- return random.choice(seq)
-
-
class RRCacheTest(unittest.TestCase, CacheTestMixin):
- def cache(self, maxsize, choice=choice, missing=None, getsizeof=None):
- return RRCache(maxsize, choice=choice, missing=missing,
- getsizeof=getsizeof)
+ Cache = RRCache
- def test_choice(self):
- cache = self.cache(maxsize=2, choice=min)
+ def test_rr(self):
+ cache = RRCache(maxsize=2, choice=min)
self.assertEqual(min, cache.choice)
cache[1] = 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/tests/test_ttl.py new/cachetools-3.1.0/tests/test_ttl.py
--- old/cachetools-2.0.1/tests/test_ttl.py 2016-04-22 15:03:41.000000000 +0200
+++ new/cachetools-3.1.0/tests/test_ttl.py 2018-11-04 20:58:27.000000000 +0100
@@ -19,42 +19,17 @@
self.time += 1
-class TTLCacheTest(unittest.TestCase, CacheTestMixin):
-
- def cache(self, maxsize, ttl=0, missing=None, getsizeof=None):
- return TTLCache(maxsize, ttl, timer=Timer(), missing=missing,
- getsizeof=getsizeof)
+class TTLTestCache(TTLCache):
+ def __init__(self, maxsize, ttl=0, **kwargs):
+ TTLCache.__init__(self, maxsize, ttl=ttl, timer=Timer(), **kwargs)
- def test_lru(self):
- cache = self.cache(maxsize=2)
-
- cache[1] = 1
- cache[2] = 2
- cache[3] = 3
- self.assertEqual(len(cache), 2)
- self.assertNotIn(1, cache)
- self.assertEqual(cache[2], 2)
- self.assertEqual(cache[3], 3)
-
- cache[2]
- cache[4] = 4
- self.assertEqual(len(cache), 2)
- self.assertNotIn(1, cache)
- self.assertEqual(cache[2], 2)
- self.assertNotIn(3, cache)
- self.assertEqual(cache[4], 4)
+class TTLCacheTest(unittest.TestCase, CacheTestMixin):
- cache[5] = 5
- self.assertEqual(len(cache), 2)
- self.assertNotIn(1, cache)
- self.assertNotIn(2, cache)
- self.assertNotIn(3, cache)
- self.assertEqual(cache[4], 4)
- self.assertEqual(cache[5], 5)
+ Cache = TTLTestCache
def test_ttl(self):
- cache = self.cache(maxsize=2, ttl=1)
+ cache = TTLCache(maxsize=2, ttl=1, timer=Timer())
self.assertEqual(0, cache.timer())
self.assertEqual(1, cache.ttl)
@@ -108,8 +83,36 @@
with self.assertRaises(KeyError):
del cache[3]
- def test_expire(self):
- cache = self.cache(maxsize=3, ttl=2)
+ def test_ttl_lru(self):
+ cache = TTLCache(maxsize=2, ttl=0, timer=Timer())
+
+ cache[1] = 1
+ cache[2] = 2
+ cache[3] = 3
+
+ self.assertEqual(len(cache), 2)
+ self.assertNotIn(1, cache)
+ self.assertEqual(cache[2], 2)
+ self.assertEqual(cache[3], 3)
+
+ cache[2]
+ cache[4] = 4
+ self.assertEqual(len(cache), 2)
+ self.assertNotIn(1, cache)
+ self.assertEqual(cache[2], 2)
+ self.assertNotIn(3, cache)
+ self.assertEqual(cache[4], 4)
+
+ cache[5] = 5
+ self.assertEqual(len(cache), 2)
+ self.assertNotIn(1, cache)
+ self.assertNotIn(2, cache)
+ self.assertNotIn(3, cache)
+ self.assertEqual(cache[4], 4)
+ self.assertEqual(cache[5], 5)
+
+ def test_ttl_expire(self):
+ cache = TTLCache(maxsize=3, ttl=2, timer=Timer())
with cache.timer as time:
self.assertEqual(time, cache.timer())
self.assertEqual(2, cache.ttl)
@@ -155,7 +158,7 @@
self.assertNotIn(2, cache)
self.assertNotIn(3, cache)
- def test_atomic(self):
+ def test_ttl_atomic(self):
cache = TTLCache(maxsize=1, ttl=1, timer=Timer(auto=True))
cache[1] = 1
self.assertEqual(1, cache[1])
@@ -169,22 +172,8 @@
cache.clear()
self.assertEqual(0, len(cache))
- def test_missing(self):
- class DefaultTTLCache(TTLCache):
- def __missing__(self, key):
- self[key] = key
- return key
-
- cache = DefaultTTLCache(maxsize=1, ttl=1, timer=Timer())
- self.assertEqual(1, cache[1])
- self.assertIn(1, cache)
- self.assertNotIn(2, cache)
- self.assertEqual(2, cache[2])
- self.assertNotIn(1, cache)
- self.assertIn(2, cache)
-
- def test_tuple_key(self):
- cache = self.cache(maxsize=1, ttl=0)
+ def test_ttl_tuple_key(self):
+ cache = TTLCache(maxsize=1, ttl=0, timer=Timer())
self.assertEqual(0, cache.ttl)
cache[(1, 2, 3)] = 42
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cachetools-2.0.1/tox.ini new/cachetools-3.1.0/tox.ini
--- old/cachetools-2.0.1/tox.ini 2016-10-03 14:09:18.000000000 +0200
+++ new/cachetools-3.1.0/tox.ini 2018-11-04 20:58:27.000000000 +0100
@@ -1,5 +1,5 @@
[tox]
-envlist = check-manifest,docs,flake8,py
+envlist = check-manifest,docs,doctest,flake8,py
[testenv]
deps =
@@ -22,6 +22,13 @@
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
+[testenv:doctest]
+deps =
+ mock
+ sphinx
+commands =
+ sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs {envtmpdir}/doctest
+
[testenv:flake8]
deps =
flake8
1
0
Hello community,
here is the log from the commit of package cilium for openSUSE:Factory checked in at 2019-02-28 21:44:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cilium (Old)
and /work/SRC/openSUSE:Factory/.cilium.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cilium"
Thu Feb 28 21:44:21 2019 rev:8 rq:679881 version:1.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/cilium/cilium.changes 2019-02-25 17:59:05.854193698 +0100
+++ /work/SRC/openSUSE:Factory/.cilium.new.28833/cilium.changes 2019-02-28 21:44:22.657500138 +0100
@@ -1,0 +2,19 @@
+Wed Feb 27 15:52:38 UTC 2019 - ndas(a)suse.de
+
+- Fix license. BPF code templates are licensed under GPLv2 while
+ the rest is under Apache License, v2
+ (see https://github.com/cilium/cilium#license)
+
+ Cilium (the component licensed on Apache 2.0, written in Go) does
+ two things with BPF program sources (licensed on GPL-2.0):
+
+ * it executes llvm/clang to compile BPF program sources to object
+ files
+ * it executes tc (a utility which is a part of iproute2) to load
+ object files into the kernel
+
+ So, Cilium as a Go program only does execv calls on external
+ utilities (llvm and iproute2) to perform some actions on BPF
+ program sources and objects.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cilium.spec ++++++
--- /var/tmp/diff_new_pack.Ov1gBD/_old 2019-02-28 21:44:23.761499666 +0100
+++ /var/tmp/diff_new_pack.Ov1gBD/_new 2019-02-28 21:44:23.761499666 +0100
@@ -38,7 +38,7 @@
Version: 1.4.0
Release: 0
Summary: Linux Native, HTTP Aware Networking and Security for Containers
-License: Apache-2.0 AND GPL-2.0-only
+License: Apache-2.0 AND GPL-2.0-or-later
Group: System/Management
URL: https://github.com/cilium/cilium
Source: %{name}-%{version}.tar.gz
1
0
Hello community,
here is the log from the commit of package yast2-reipl for openSUSE:Factory checked in at 2019-02-28 21:44:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-reipl (Old)
and /work/SRC/openSUSE:Factory/.yast2-reipl.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-reipl"
Thu Feb 28 21:44:14 2019 rev:39 rq:679859 version:4.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-reipl/yast2-reipl.changes 2018-10-25 09:09:56.114376197 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-reipl.new.28833/yast2-reipl.changes 2019-02-28 21:44:14.913503444 +0100
@@ -1,0 +2,6 @@
+Tue Feb 26 13:03:41 UTC 2019 - José Iván López González <jlopez(a)suse.com>
+
+- Version bump (bsc#1124009)
+- 4.1.0
+
+-------------------------------------------------------------------
Old:
----
yast2-reipl-4.0.1.tar.bz2
New:
----
yast2-reipl-4.1.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-reipl.spec ++++++
--- /var/tmp/diff_new_pack.xxTaZV/_old 2019-02-28 21:44:15.377503247 +0100
+++ /var/tmp/diff_new_pack.xxTaZV/_new 2019-02-28 21:44:15.381503245 +0100
@@ -1,7 +1,7 @@
#
# spec file for package yast2-reipl
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: yast2-reipl
-Version: 4.0.1
+Version: 4.1.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-reipl-4.0.1.tar.bz2 -> yast2-reipl-4.1.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-4.0.1/package/yast2-reipl.changes new/yast2-reipl-4.1.0/package/yast2-reipl.changes
--- old/yast2-reipl-4.0.1/package/yast2-reipl.changes 2018-10-23 17:03:04.000000000 +0200
+++ new/yast2-reipl-4.1.0/package/yast2-reipl.changes 2019-02-27 15:46:06.000000000 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Feb 26 13:03:41 UTC 2019 - José Iván López González <jlopez(a)suse.com>
+
+- Version bump (bsc#1124009)
+- 4.1.0
+
+-------------------------------------------------------------------
Tue Oct 23 16:45:51 CEST 2018 - schubi(a)suse.de
- Fixed path to license file. Build error in bsc#1087957.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-reipl-4.0.1/package/yast2-reipl.spec new/yast2-reipl-4.1.0/package/yast2-reipl.spec
--- old/yast2-reipl-4.0.1/package/yast2-reipl.spec 2018-10-23 17:03:04.000000000 +0200
+++ new/yast2-reipl-4.1.0/package/yast2-reipl.spec 2019-02-27 15:46:06.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-reipl
-Version: 4.0.1
+Version: 4.1.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
1
0
Hello community,
here is the log from the commit of package yast2-vpn for openSUSE:Factory checked in at 2019-02-28 21:44:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-vpn (Old)
and /work/SRC/openSUSE:Factory/.yast2-vpn.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-vpn"
Thu Feb 28 21:44:11 2019 rev:9 rq:679849 version:4.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-vpn/yast2-vpn.changes 2019-01-03 18:05:55.728177648 +0100
+++ /work/SRC/openSUSE:Factory/.yast2-vpn.new.28833/yast2-vpn.changes 2019-02-28 21:44:13.105504216 +0100
@@ -1,0 +2,6 @@
+Tue Feb 26 11:42:31 UTC 2019 - José Iván López González <jlopez(a)suse.com>
+
+- Version bump (bsc#1124009)
+- 4.1.0
+
+-------------------------------------------------------------------
Old:
----
yast2-vpn-4.0.1.tar.bz2
New:
----
yast2-vpn-4.1.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-vpn.spec ++++++
--- /var/tmp/diff_new_pack.RsvlUa/_old 2019-02-28 21:44:14.009503831 +0100
+++ /var/tmp/diff_new_pack.RsvlUa/_new 2019-02-28 21:44:14.009503831 +0100
@@ -1,7 +1,7 @@
#
# spec file for package yast2-vpn
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: yast2-vpn
-Version: 4.0.1
+Version: 4.1.0
Release: 0
Url: https://github.com/yast/yast-vpn
Source0: %{name}-%{version}.tar.bz2
++++++ yast2-vpn-4.0.1.tar.bz2 -> yast2-vpn-4.1.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vpn-4.0.1/package/yast2-vpn.changes new/yast2-vpn-4.1.0/package/yast2-vpn.changes
--- old/yast2-vpn-4.0.1/package/yast2-vpn.changes 2018-11-28 17:29:32.000000000 +0100
+++ new/yast2-vpn-4.1.0/package/yast2-vpn.changes 2019-02-27 15:42:49.000000000 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Feb 26 11:42:31 UTC 2019 - José Iván López González <jlopez(a)suse.com>
+
+- Version bump (bsc#1124009)
+- 4.1.0
+
+-------------------------------------------------------------------
Mon Nov 26 06:25:02 UTC 2018 - Noah Davis <noahadvs(a)gmail.com>
- Provide icon with module (boo#1109310)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-vpn-4.0.1/package/yast2-vpn.spec new/yast2-vpn-4.1.0/package/yast2-vpn.spec
--- old/yast2-vpn-4.0.1/package/yast2-vpn.spec 2018-11-28 17:29:32.000000000 +0100
+++ new/yast2-vpn-4.1.0/package/yast2-vpn.spec 2019-02-27 15:42:49.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-vpn
-Version: 4.0.1
+Version: 4.1.0
Release: 0
Url: https://github.com/yast/yast-vpn
Source0: %{name}-%{version}.tar.bz2
1
0
Hello community,
here is the log from the commit of package yast2-s390 for openSUSE:Factory checked in at 2019-02-28 21:44:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-s390 (Old)
and /work/SRC/openSUSE:Factory/.yast2-s390.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-s390"
Thu Feb 28 21:44:12 2019 rev:8 rq:679857 version:4.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-s390/yast2-s390.changes 2018-09-25 15:43:51.865198098 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-s390.new.28833/yast2-s390.changes 2019-02-28 21:44:14.253503726 +0100
@@ -1,0 +2,11 @@
+Tue Feb 26 12:57:12 UTC 2019 - José Iván López González <jlopez(a)suse.com>
+
+- Version bump (bsc#1124009)
+- 4.1.0
+
+-------------------------------------------------------------------
+Tue Oct 16 15:14:53 CEST 2018 - schubi(a)suse.de
+
+- Added license file to spec.
+
+-------------------------------------------------------------------
Old:
----
yast2-s390-4.0.5.tar.bz2
New:
----
yast2-s390-4.1.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-s390.spec ++++++
--- /var/tmp/diff_new_pack.r98JJq/_old 2019-02-28 21:44:14.681503544 +0100
+++ /var/tmp/diff_new_pack.r98JJq/_new 2019-02-28 21:44:14.685503542 +0100
@@ -1,7 +1,7 @@
#
# spec file for package yast2-s390
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: yast2-s390
-Version: 4.0.5
+Version: 4.1.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -69,5 +69,6 @@
%{yast_desktopdir}/*.desktop
%{yast_schemadir}/autoyast/rnc/*.rnc
%doc %{yast_docdir}
+%license COPYING
%changelog
++++++ yast2-s390-4.0.5.tar.bz2 -> yast2-s390-4.1.0.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-s390-4.0.5/package/yast2-s390.changes new/yast2-s390-4.1.0/package/yast2-s390.changes
--- old/yast2-s390-4.0.5/package/yast2-s390.changes 2018-09-24 09:42:42.000000000 +0200
+++ new/yast2-s390-4.1.0/package/yast2-s390.changes 2019-02-27 15:45:26.000000000 +0100
@@ -1,4 +1,15 @@
-------------------------------------------------------------------
+Tue Feb 26 12:57:12 UTC 2019 - José Iván López González <jlopez(a)suse.com>
+
+- Version bump (bsc#1124009)
+- 4.1.0
+
+-------------------------------------------------------------------
+Tue Oct 16 15:14:53 CEST 2018 - schubi(a)suse.de
+
+- Added license file to spec.
+
+-------------------------------------------------------------------
Fri Sep 21 11:43:00 UTC 2018 - dgonzalez(a)suse.com
- Avoid hanging YaST when try to deactivate a DASD in use
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-s390-4.0.5/package/yast2-s390.spec new/yast2-s390-4.1.0/package/yast2-s390.spec
--- old/yast2-s390-4.0.5/package/yast2-s390.spec 2018-09-24 09:42:42.000000000 +0200
+++ new/yast2-s390-4.1.0/package/yast2-s390.spec 2019-02-27 15:45:26.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-s390
-Version: 4.0.5
+Version: 4.1.0
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -69,3 +69,4 @@
%{yast_desktopdir}/*.desktop
%{yast_schemadir}/autoyast/rnc/*.rnc
%doc %{yast_docdir}
+%license COPYING
1
0
Hello community,
here is the log from the commit of package python-aiohttp for openSUSE:Factory checked in at 2019-02-28 21:44:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-aiohttp (Old)
and /work/SRC/openSUSE:Factory/.python-aiohttp.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-aiohttp"
Thu Feb 28 21:44:07 2019 rev:11 rq:679845 version:3.5.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-aiohttp/python-aiohttp.changes 2019-01-21 10:56:48.635551423 +0100
+++ /work/SRC/openSUSE:Factory/.python-aiohttp.new.28833/python-aiohttp.changes 2019-02-28 21:44:10.941505142 +0100
@@ -1,0 +2,7 @@
+Wed Feb 27 14:25:09 UTC 2019 - Ondřej Súkup <mimi.vx(a)gmail.com>
+
+- update to 3.5.4
+- drop invalid-escapes-in-tests.patch and rename-request-fixture.patch
+ * big list of changes from 3.4.4 - https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst
+
+-------------------------------------------------------------------
Old:
----
aiohttp-3.4.4.tar.gz
invalid-escapes-in-tests.patch
rename-request-fixture.patch
New:
----
aiohttp-3.5.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-aiohttp.spec ++++++
--- /var/tmp/diff_new_pack.rfPlOY/_old 2019-02-28 21:44:11.721504808 +0100
+++ /var/tmp/diff_new_pack.rfPlOY/_new 2019-02-28 21:44:11.725504806 +0100
@@ -19,19 +19,13 @@
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-aiohttp
-Version: 3.4.4
+Version: 3.5.4
Release: 0
Summary: Asynchronous HTTP client/server framework
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/aio-libs/aiohttp
Source: https://files.pythonhosted.org/packages/source/a/aiohttp/aiohttp-%{version}…
-# PATCH-FIX-UPSTREAM mcepl(a)suse.com -- Fix failing tests due to invalid escapes in regexps
-# https://github.com/aio-libs/aiohttp/issues/3325
-Patch0: invalid-escapes-in-tests.patch
-# PATCH-FIX-UPSTREAM glaubitz(a)suse.com -- Fix failing test due to naming conflict with pytest fixtures
-# https://github.com/aio-libs/aiohttp/issues/3392
-Patch1: rename-request-fixture.patch
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel >= 3.5.3}
BuildRequires: %{python_module setuptools}
@@ -43,7 +37,6 @@
Requires: python-brotlipy
Requires: python-chardet >= 2.0
Requires: python-gunicorn
-Requires: python-idna_ssl >= 1.0.0
Requires: python-multidict >= 4.0
Requires: python-yarl >= 1.0
Recommends: python-aiodns
@@ -56,13 +49,15 @@
BuildRequires: %{python_module brotlipy}
BuildRequires: %{python_module chardet >= 2.0}
BuildRequires: %{python_module gunicorn}
-BuildRequires: %{python_module idna_ssl >= 1.0.0}
BuildRequires: %{python_module multidict >= 4.0}
BuildRequires: %{python_module pluggy}
+BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest-timeout}
+BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
+BuildRequires: %{python_module trustme}
BuildRequires: %{python_module yarl >= 1.0}
# /SECTION
# SECTION docs
@@ -92,7 +87,6 @@
%prep
%setup -q -n aiohttp-%{version}
-%autopatch -p1
%build
export CFLAGS="%{optflags}"
@@ -109,7 +103,6 @@
}
%check
-rm tests/test_pytest_plugin.py
%python_exec setup.py test
%files %{python_files}
++++++ aiohttp-3.4.4.tar.gz -> aiohttp-3.5.4.tar.gz ++++++
++++ 52887 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package cf-cli for openSUSE:Factory checked in at 2019-02-28 21:44:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cf-cli (Old)
and /work/SRC/openSUSE:Factory/.cf-cli.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cf-cli"
Thu Feb 28 21:44:05 2019 rev:3 rq:679844 version:6.43.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/cf-cli/cf-cli.changes 2018-11-26 10:22:25.201583676 +0100
+++ /work/SRC/openSUSE:Factory/.cf-cli.new.28833/cf-cli.changes 2019-02-28 21:44:06.877506876 +0100
@@ -1,0 +2,43 @@
+Thu Feb 21 09:52:22 UTC 2019 - thardeck(a)suse.com
+
+- update to version 6.43.0
+ ### Enhancements
+ - `cf curl` supports a new `--fail` flag (primarily for scripting purposes) which returns exit code `22` for server errors [story](https://www.pivotaltracker.com/story/show/130060949)
+ - Improves `cf delete-orphaned-routes` such that it uses a different endpoint, reducing the chance of a race condition when two users are simultaneously deleting orphaned routes and associating routes with applications [story](https://www.pivotaltracker.com/story/show/163156064)
+ - we've improved the speed of cf services - it now hits a single endpoint instead of making individual API calls
+ ### Bug Fixes
+ #### Security
+ - Fixes issue with running cf login in verbose mode whereby passwords which contains regex were not completely redacted
+ - Fixes issue whilst running commands in verbose mode refresh tokens were not completely redacted
+ ### Other Bug Fixes
+ - Updates help text for cf curlstory
+ - Now refresh tokens work properly whilst using cf curl with V3 CC API endpoints story
+ - Fixes performance degradation for cf services story
+ - cf delete-service requires that you are targeting a space story
+ - cf enable-service access for a service in an org will succeed if you have already enabled access for that service in that org story
+
+-------------------------------------------------------------------
+Thu Jan 17 22:20:34 UTC 2019 - thardeck(a)suse.com
+
+- update to version 6.42.0
+ ### Minor Enhancements
+ - updated `cf restage` help text and the first line in the command's output to indicate that using this command will cause app downtime [story](https://www.pivotaltracker.com/story/show/151841382)
+ - updated the `cf bind-route-service` help text to clarify usage instructions [story](https://www.pivotaltracker.com/story/show/150111078)
+ - improved an error message for `cf create-service-boker` to be more helpful when the CC API returns a `502` due to an invalid service broker catalog
+ - upgraded to Golang 1.11.4 [story](https://www.pivotaltracker.com/story/show/162745359)
+ - added a short name `ue` for `cf unset-env` [story](https://www.pivotaltracker.com/story/show/161632713)
+ - updated `cf marketplace` command to include a new `broker` column to prepare for a upcoming services-related feature which will allow services to have the same name as long as they are associated with different service brokers [story](https://www.pivotaltracker.com/story/show/162699756)
+ ### Bugs
+ - fix for `cf enable-service-access -p plan` whereby when we refactored the code in CLI `v6.41.0` it created service plan visibilities as part of a subsequent run of the command (the unrefactored code skipped creating the service plan visibilities); now the command will skip creating service plan visibilities as it did prior to the refactor [story](https://www.pivotaltracker.com/story/show/162747373)
+ - updated the `cf rename-buildpack` help text which was missing reference to the `-s` stack flag [story](https://www.pivotaltracker.com/story/show/162428661)
+ - updated help text for when users use `brew search cloudfoundry-cli` [story](https://www.pivotaltracker.com/story/show/161770940)
+ - now when you run `cf service service-instance` for a route service, the route service url appears in the key value table [story](https://www.pivotaltracker.com/story/show/162498211)
+
+-------------------------------------------------------------------
+Mon Dec 3 19:00:45 UTC 2018 - thardeck(a)suse.com
+
+- update to version 6.41.0
+ ### Enhancements
+ - updated `cf --help` to include the `delete` command [story](https://www.pivotaltracker.com/story/show/161556511)
+
+-------------------------------------------------------------------
Old:
----
v6.40.1.tar.gz
New:
----
v6.43.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cf-cli.spec ++++++
--- /var/tmp/diff_new_pack.cYzNfn/_old 2019-02-28 21:44:09.089505932 +0100
+++ /var/tmp/diff_new_pack.cYzNfn/_new 2019-02-28 21:44:09.093505931 +0100
@@ -1,7 +1,7 @@
#
# spec file for package cf
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -35,7 +35,7 @@
%define short_name cf-cli
Name: %{short_name}%{?name_ext}
-Version: 6.40.1
+Version: 6.43.0
Release: 0
Summary: Cloud Foundry command line client
License: Apache-2.0
@@ -47,7 +47,7 @@
%if 0%{?_test}
BuildRequires: %{short_name} = %{version}
%else
-BuildRequires: go >= 1.8.3
+BuildRequires: go >= 1.10.0
BuildRequires: golang-packaging
BuildRequires: xz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ v6.40.1.tar.gz -> v6.43.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/cf-cli/v6.40.1.tar.gz /work/SRC/openSUSE:Factory/.cf-cli.new.28833/v6.43.0.tar.gz differ: char 13, line 1
1
0
Hello community,
here is the log from the commit of package python-pytest-instafail for openSUSE:Factory checked in at 2019-02-28 21:44:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-instafail (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-instafail.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-instafail"
Thu Feb 28 21:44:04 2019 rev:4 rq:679828 version:0.4.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-instafail/python-pytest-instafail.changes 2019-02-25 17:51:31.378747710 +0100
+++ /work/SRC/openSUSE:Factory/.python-pytest-instafail.new.28833/python-pytest-instafail.changes 2019-02-28 21:44:05.417507500 +0100
@@ -1,0 +2,7 @@
+Wed Feb 27 13:51:04 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Update to 0.4.1:
+ * Fixed compatibility with pytest 4.2.0. Thanks @blueyed for the PR.
+- Drop merged patch pytest42.patch
+
+-------------------------------------------------------------------
Old:
----
pytest-instafail-0.4.0.tar.gz
pytest42.patch
New:
----
pytest-instafail-0.4.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-instafail.spec ++++++
--- /var/tmp/diff_new_pack.hBy0Sy/_old 2019-02-28 21:44:05.917507287 +0100
+++ /var/tmp/diff_new_pack.hBy0Sy/_new 2019-02-28 21:44:05.917507287 +0100
@@ -18,14 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-instafail
-Version: 0.4.0
+Version: 0.4.1
Release: 0
Summary: Pytest Plugin to Show Failures Instantly
License: BSD-2-Clause
Group: Development/Languages/Python
URL: https://github.com/jpvanhal/pytest-instafail
Source: https://files.pythonhosted.org/packages/source/p/pytest-instafail/pytest-in…
-Patch0: pytest42.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -43,7 +42,6 @@
%prep
%setup -q -n pytest-instafail-%{version}
-%patch0 -p1
%build
%python_build
++++++ pytest-instafail-0.4.0.tar.gz -> pytest-instafail-0.4.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-instafail-0.4.0/CHANGES.rst new/pytest-instafail-0.4.1/CHANGES.rst
--- old/pytest-instafail-0.4.0/CHANGES.rst 2018-05-19 13:39:31.000000000 +0200
+++ new/pytest-instafail-0.4.1/CHANGES.rst 2019-02-15 14:45:52.000000000 +0100
@@ -3,6 +3,11 @@
Here you can see the full list of changes between each pytest-instafail release.
+0.4.1 (February 15, 2019)
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed compatibility with pytest 4.2.0. Thanks @blueyed for the PR.
+
0.4.0 (May 19, 2018)
^^^^^^^^^^^^^^^^^^^^
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-instafail-0.4.0/PKG-INFO new/pytest-instafail-0.4.1/PKG-INFO
--- old/pytest-instafail-0.4.0/PKG-INFO 2018-05-19 13:40:04.000000000 +0200
+++ new/pytest-instafail-0.4.1/PKG-INFO 2019-02-15 14:46:53.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: pytest-instafail
-Version: 0.4.0
+Version: 0.4.1
Summary: py.test plugin to show failures instantly
Home-page: https://github.com/pytest-dev/pytest-instafail
Author: Janne Vanhala
Author-email: janne.vanhala(a)gmail.com
License: BSD
-Description-Content-Type: UNKNOWN
Description: pytest-instafail
================
@@ -24,7 +23,7 @@
You will need the following prerequisites in order to use pytest-instafail:
- - Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5 or PyPy
+ - Python 2.7, 3.4, 3.5, 3.6, 3.7 or PyPy
- pytest 2.9 or newer
Installation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-instafail-0.4.0/README.rst new/pytest-instafail-0.4.1/README.rst
--- old/pytest-instafail-0.4.0/README.rst 2018-05-19 09:10:36.000000000 +0200
+++ new/pytest-instafail-0.4.1/README.rst 2018-05-19 13:45:24.000000000 +0200
@@ -15,7 +15,7 @@
You will need the following prerequisites in order to use pytest-instafail:
-- Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5 or PyPy
+- Python 2.7, 3.4, 3.5, 3.6, 3.7 or PyPy
- pytest 2.9 or newer
Installation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-instafail-0.4.0/pytest_instafail.egg-info/PKG-INFO new/pytest-instafail-0.4.1/pytest_instafail.egg-info/PKG-INFO
--- old/pytest-instafail-0.4.0/pytest_instafail.egg-info/PKG-INFO 2018-05-19 13:40:04.000000000 +0200
+++ new/pytest-instafail-0.4.1/pytest_instafail.egg-info/PKG-INFO 2019-02-15 14:46:53.000000000 +0100
@@ -1,12 +1,11 @@
Metadata-Version: 1.1
Name: pytest-instafail
-Version: 0.4.0
+Version: 0.4.1
Summary: py.test plugin to show failures instantly
Home-page: https://github.com/pytest-dev/pytest-instafail
Author: Janne Vanhala
Author-email: janne.vanhala(a)gmail.com
License: BSD
-Description-Content-Type: UNKNOWN
Description: pytest-instafail
================
@@ -24,7 +23,7 @@
You will need the following prerequisites in order to use pytest-instafail:
- - Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5 or PyPy
+ - Python 2.7, 3.4, 3.5, 3.6, 3.7 or PyPy
- pytest 2.9 or newer
Installation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-instafail-0.4.0/pytest_instafail.py new/pytest-instafail-0.4.1/pytest_instafail.py
--- old/pytest-instafail-0.4.0/pytest_instafail.py 2018-05-19 13:37:41.000000000 +0200
+++ new/pytest-instafail-0.4.1/pytest_instafail.py 2019-02-15 14:44:05.000000000 +0100
@@ -76,11 +76,13 @@
self.write_line(line)
else:
msg = self._getfailureheadline(report)
- if not hasattr(report, 'when'):
+ # "when" was unset before pytest 4.2 for collection errors.
+ when = getattr(report, "when", "collect")
+ if when == "collect":
msg = "ERROR collecting " + msg
- elif report.when == "setup":
+ elif when == "setup":
msg = "ERROR at setup of " + msg
- elif report.when == "teardown":
+ elif when == "teardown":
msg = "ERROR at teardown of " + msg
self.write_sep("_", msg)
if not self.config.getvalue("usepdb"):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pytest-instafail-0.4.0/setup.py new/pytest-instafail-0.4.1/setup.py
--- old/pytest-instafail-0.4.0/setup.py 2018-05-19 13:39:17.000000000 +0200
+++ new/pytest-instafail-0.4.1/setup.py 2019-02-15 14:44:26.000000000 +0100
@@ -4,7 +4,7 @@
name='pytest-instafail',
description='py.test plugin to show failures instantly',
long_description=open("README.rst").read(),
- version='0.4.0',
+ version='0.4.1',
url='https://github.com/pytest-dev/pytest-instafail',
license='BSD',
author='Janne Vanhala',
1
0
Hello community,
here is the log from the commit of package python-cssselect2 for openSUSE:Factory checked in at 2019-02-28 21:43:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cssselect2 (Old)
and /work/SRC/openSUSE:Factory/.python-cssselect2.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cssselect2"
Thu Feb 28 21:43:55 2019 rev:3 rq:679803 version:0.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cssselect2/python-cssselect2.changes 2018-12-13 19:42:11.065189732 +0100
+++ /work/SRC/openSUSE:Factory/.python-cssselect2.new.28833/python-cssselect2.changes 2019-02-28 21:43:59.265510127 +0100
@@ -1,0 +2,12 @@
+Wed Feb 27 13:06:42 UTC 2019 - Tomáš Chvátal <tchvatal(a)suse.com>
+
+- Fix the build again
+
+-------------------------------------------------------------------
+Tue Feb 26 12:19:15 UTC 2019 - John Vandenberg <jayvdb(a)gmail.com>
+
+- Remove unnecessary build dependencies on pytest plugins, by
+ invoking pytest directly avoiding setup.py checking test deps,
+ and removing addopts from setup.cfg
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-cssselect2.spec ++++++
--- /var/tmp/diff_new_pack.pxN5yp/_old 2019-02-28 21:43:59.741509924 +0100
+++ /var/tmp/diff_new_pack.pxN5yp/_new 2019-02-28 21:43:59.745509922 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-cssselect2
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -29,10 +29,6 @@
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
-BuildRequires: %{python_module pytest-cov}
-BuildRequires: %{python_module pytest-flake8}
-BuildRequires: %{python_module pytest-isort}
-BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module tinycss2}
# /SECTION
@@ -52,6 +48,7 @@
%prep
%setup -q -n cssselect2-%{version}
+sed -i '/addopts/d' setup.cfg
%build
%python_build
@@ -62,7 +59,7 @@
%check
export LANG=en_US.UTF-8
-%python_exec setup.py test
+%python_exec -m pytest cssselect2/tests
%files %{python_files}
%doc CHANGES README.rst
1
0
Hello community,
here is the log from the commit of package freeradius-server for openSUSE:Factory checked in at 2019-02-28 21:43:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/freeradius-server (Old)
and /work/SRC/openSUSE:Factory/.freeradius-server.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "freeradius-server"
Thu Feb 28 21:43:53 2019 rev:75 rq:679792 version:3.0.18
Changes:
--------
--- /work/SRC/openSUSE:Factory/freeradius-server/freeradius-server.changes 2018-06-27 10:23:01.176540643 +0200
+++ /work/SRC/openSUSE:Factory/.freeradius-server.new.28833/freeradius-server.changes 2019-02-28 21:43:54.949511971 +0100
@@ -1,0 +2,127 @@
+Wed Feb 27 11:37:53 UTC 2019 - adam.majer(a)suse.de
+
+- reformat changelog mostly by wrapping lines
+- add missing bug numbers for security fixes
+
+-------------------------------------------------------------------
+Tue Feb 26 21:17:00 UTC 2019 - Michael Ströder <michael(a)stroeder.com>
+
+- update to 3.0.18
+
+* cleanup_delay can now be 30 seconds. This helps with proxies that have packet loss.
+* Do-Not-Respond policies can now be set in the "post-auth" section.
+* Encode / Decode ADSL Forum DHCP options.
+* Fix module ordering issues. e.g. when "sqlippool" needs "sql".
+ See the "instantiate" section of radiusd.conf.
+* Add Big Switch dictionary. Fixes #2252.
+* Add sql_session_start policy (raddb/policy.d/accounting)
+ This minimizes race conditions when using Simultaneous-Use (#2257).
+* For rlm_perl, all variables are now tainted by default.
+ See raddb/mods-available/perl, and the "perl_flags" configuration item.
+ This change should only affect people who are using variables in
+ insecure ways.
+* Allow "sqlcounter" module to be listed in "post-auth".
+* Add support for IPv6 attributes in SQL. Fixes #2280
+* The server is better at handling fail-over for outbound RadSec and
+ TCP connections. Fixes #2284.
+* The server is now more aggressive about retrying failed outbound
+ RadSec and TCP connections. Fixes #2284.
+* Add TLS-Session-Version and TLS-Session-Cipher-Suite to the "session_state" list.
+* Add expansion for Radsec connections. "%{listen:TLS-...}" for
+ TLS-Client-Cert-* and TLS-Cert-* attributes.
+* Add notes on running "ldapsearch" using the parameters from the LDAP module.
+* "ipaddr" attributes can now be cast to "integer" type attributes
+ in an "update" section.
+* Move main thread queue to using atomic queues. This should help
+ with contention in high load scenarios.
+* Add "recv_buff" setting to listeners. For more details,
+ see sites-available/default.
+* The sqlippool module can now use attributes other than "Pool-Name"
+ to assign IP pools. The "Pool-Name" attribute is still the default.
+* The "unpack" expansion can now unpack substrings.
+ See mods-available/unpack for documentation and examples.
+* The preprocess module now does "ciscvo_vsa_hack" for Eltex-AVPair
+ Fixes #2301. Vendors SHOULD NOT USE THAT KIND OF ATTRIBUTE.
+* Allow for <instance>-LDAP-UserDN. See mods-available/ldap for more information.
+* Add sanitizing of control list for moonshot. Fixes #2318.
+* Update rlm_sql_mysql to be compatible with MySQL 8
+ Fixes https://bugs.launchpad.net/bugs/1795310.
+* Allow logging of only Access-Accept or Access-Reject messages
+ See radiusd.conf, "auth_accept" and "auth_reject".
+* Removed Connect-Rate comparison. It was unused and broken.
+* Add dictionary.infinera.
+* Use OpenSSL HMAC functions instead of local ones.
+* Some SQL modules can now use "auto_escape" to escape unsafe strings
+ See mods-config/sql/main/mysql/queries.conf.
+* Add wispr2date conversion in mods-available/date.
+* Implement dictionary-based handling in rlm_python.
+ Fixes #2334 See mods-available/python for details.
+* Add support for SKIP LOCKED in sqlippool. This can improve performance
+ by an order of magnitude or more.
+ See raddb/mods-config/sql/ippool/*/queries.conf Fixes #2383
+* Allow PSK and certificates at the same time Except for TLS 1.3
+ which does not support that.
+* Update docker scripts. Fixes #2306 Patch from Matthew Newton.
+* Add crypt xlat.
+* MySQL connections can now skip verifying the server certificate.
+ Fixes #2481. See mods-available/sql.
+* Add better mechanism to detect MariaDB (Old MySQL).
+* Add RFC 7532 "bang path" support for realms Fixes #2492.
+* Update dictionary.ukerna documentation. Fixes #2493.
+* Add support for systemd service and watchdogs Fixes #2499.
+* Check for openss/rand.h, and allow building without OpenSSL engine.
+ Patch from Eneas U de Queiroz Fixes #2517.
+* The default PosgtreSQL queries now use "ON CONFLICT" to better
+ deal with issues. This requires PostgreSQL 9.5 or later.
+ Please use a recent version of PostgreSQL, or edit the default
+ queries to remove "ON CONFLICT".
+
+BUG FIXES
+* The session-state list is no longer cleaned in the inner-tunnel.
+ This lets the outer Access-Reject section access session-state.
+* Fix typo in lock initialization for TLS sockets Found by Sergio NNX.
+* Add check for crash when home server down Fixes #2233.
+* Add username key for postauth table.
+* Better libpcap checks, when the header files or libraries are missing. Fixes #2245.
+* Allow building with old versions of OpenSSL Fixes #2247.
+* Allow non-FreeRADIUS State attributes to be used with the
+ "session-state" list. i.e. State length != 16.
+* Be more aggressive about cleaning up zombie children when running in debug mode.
+* Use LTDL_DEEPBIND, which fixes issues with Oracle libraries
+ exporting LDAP API functions.
+* unlock files when asked to unlock them.
+* return error instead of asserting in map code.
+* Don't write 0 bytes to SSL. Fixes #2270.
+* Remove "expiry_time IS NULL" from allocate_update query. Fixes #2262.
+* Various dictionary cleanups and consistency checks Fixes #2281.
+* rlm_python has stronger thread locking to prevent reported issues.
+ Performance may be affected.
+* Don't allow Message-Authenticator to overflow past the end of a large packet.
+* Fix crash in sqlippool when SQL server goes away Fixes #2300.
+* Typos in man pages. Patch from Nikolai Kondrashov Fixes #2303.
+* Fix crash with CoA packets/ Fixes #2304.
+* Fix crash in rlm_exec with CoA. Fixes #2328.
+* Print errors while parsing the log config, and don't quit when
+ deprecated log settings are found.
+* Fix DHCP encoder xlat so that it can be used with a list of attributes.
+ It previously only encoded the first member of the list,
+ and now encodes all members.
+* The "expr" module now skips more whitespace.
+* Remove internal FreeRADIUS-Response-Delay attributes from
+ attr_filter Access-Reject.
+* Don't send junk to redis when maximum args reached.
+* Small updates to IPv6 for accounting schema Fixes #2364.
+* Fix OpenDirectory integration in rlm_mschap.
+* Fix slow memory leak with dynamic clients.
+* Don't artificially truncate debug output for long strings.
+* Fix memory leak in EAP-PWD.
+* Fix crash in "hints" file with Fall-Through = yes.
+* Fix crash / timer issues with many CoA packets.
+* Fix attr_filter so that it does not treat vendor attributes of
+ number 26 as Vendor-Specific.
+* Fix reconnect correctly in rlm_sql_mysql.
+* Fix rlm_cache to properly use Cache-TTL < 0 Fixes #2485.
+* Fix rare occurance of bad xlat expansion.
+* Check for rare race condition when a proxy reply arrives too late.
+
+-------------------------------------------------------------------
@@ -13 +140,2 @@
-* "stats home server" now supports "src IPADDR", to specify home server also by source IP. Fixes #2169.
+* "stats home server" now supports "src IPADDR", to specify home
+ server also by source IP. Fixes #2169.
@@ -15,2 +143,4 @@
-* Increase number of permitted file descriptors, for systems with many home servers.
-* Add TLS-Client-Cert-X509v3-Extended-Key-Usage-OIDs Patch from Isaac Boukris. Fixes #2205.
+* Increase number of permitted file descriptors, for systems with many
+ home servers.
+* Add TLS-Client-Cert-X509v3-Extended-Key-Usage-OIDs
+ Patch from Isaac Boukris. Fixes #2205.
@@ -21,2 +151,5 @@
-* Don't call post-proxy twice when proxying to a virtual server. Matthew Newton, #2161.
-* Use "raw" string value for shared secrets and dynamic clients It now parses strings with backslashes and "special characters" correctly. Fixes #2168.
+* Don't call post-proxy twice when proxying to a virtual server.
+ Matthew Newton, #2161.
+* Use "raw" string value for shared secrets and dynamic clients
+ It now parses strings with backslashes and "special characters"
+ correctly. Fixes #2168.
@@ -26 +159,2 @@
-* Be more aggressive about cleaning up cached certificate attributes, due to deficiencies in OpenSSL. Reported by Nicolas Reich.
+* Be more aggressive about cleaning up cached certificate attributes,
+ due to deficiencies in OpenSSL. Reported by Nicolas Reich.
@@ -31 +165 @@
-* Don't crash on duplicate realm + authhost / accthost Bug found by Richard Palmer.
+* Don't crash on duplicate realm + authhost / accthost
@@ -39 +173,2 @@
-* Fix "users" file (and hints, etc). So that it does not get confused about entry ordering with multiple $INCLUDEs.
+* Fix "users" file (and hints, etc). So that it does not get confused
+ about entry ordering with multiple $INCLUDEs.
@@ -44 +179,2 @@
-* Fix intermediate CA flow for OCSP. Fixes #2160 Intermediate certs which are not self-signed will now be checked.
+* Fix intermediate CA flow for OCSP. Fixes #2160 Intermediate certs
+ which are not self-signed will now be checked.
@@ -118 +254 @@
-* Don't do debug logging of bad passwords. Fixes #2064.
+* Don't do debug logging of bad passwords. Fixes #2064. (bsc#1099802)
@@ -152 +288 @@
- issues found via fuzzing by Guido Vranken
+ issues found via fuzzing by Guido Vranken (bsc#1049086)
Old:
----
freeradius-server-3.0.17.tar.bz2
freeradius-server-3.0.17.tar.bz2.sig
New:
----
freeradius-server-3.0.18.tar.bz2
freeradius-server-3.0.18.tar.bz2.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ freeradius-server.spec ++++++
--- /var/tmp/diff_new_pack.51wbsa/_old 2019-02-28 21:43:55.761511624 +0100
+++ /var/tmp/diff_new_pack.51wbsa/_new 2019-02-28 21:43:55.761511624 +0100
@@ -1,7 +1,7 @@
#
# spec file for package freeradius-server
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -20,7 +20,7 @@
%define apxs2 apxs2-prefork
%define apache2_sysconfdir %(%{_sbindir}/%{apxs2} -q SYSCONFDIR)
Name: freeradius-server
-Version: 3.0.17
+Version: 3.0.18
Release: 0
%if 0%{?suse_version} > 1140
@@ -47,7 +47,7 @@
%endif
Summary: RADIUS Server
-License: GPL-2.0 and LGPL-2.1
+License: GPL-2.0-only AND LGPL-2.1-only
Group: Productivity/Networking/Radius/Servers
Url: http://www.freeradius.org/
Source: ftp://ftp.freeradius.org/pub/freeradius/%{name}-%{version}.tar.bz2
@@ -602,6 +602,7 @@
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/policy.d/operator-name
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/policy.d/abfab-tr
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/policy.d/debug
+%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/policy.d/rfc7542
%config(noreplace) %{_sysconfdir}/raddb/users
%attr(640,root,radiusd) %config(noreplace) %{_sysconfdir}/raddb/templates.conf
++++++ freeradius-server-3.0.17.tar.bz2 -> freeradius-server-3.0.18.tar.bz2 ++++++
++++ 21178 lines of diff (skipped)
1
0