Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-circuitbreaker for openSUSE:Factory checked in at 2021-10-27 22:21:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-circuitbreaker (Old) and /work/SRC/openSUSE:Factory/.python-circuitbreaker.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-circuitbreaker" Wed Oct 27 22:21:24 2021 rev:2 rq:927838 version:1.3.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-circuitbreaker/python-circuitbreaker.changes 2021-10-26 20:15:03.170052882 +0200 +++ /work/SRC/openSUSE:Factory/.python-circuitbreaker.new.1890/python-circuitbreaker.changes 2021-10-27 22:21:45.755215788 +0200 @@ -1,0 +2,6 @@ +Wed Oct 27 17:56:18 UTC 2021 - Matej Cepl <mc...@suse.com> + +- Update to 1.3.2: + - tests are included in the tarball + +------------------------------------------------------------------- Old: ---- circuitbreaker-1.3.1.tar.gz New: ---- circuitbreaker-1.3.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-circuitbreaker.spec ++++++ --- /var/tmp/diff_new_pack.fIENJj/_old 2021-10-27 22:21:46.195216013 +0200 +++ /var/tmp/diff_new_pack.fIENJj/_new 2021-10-27 22:21:46.195216013 +0200 @@ -19,12 +19,12 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define modname circuitbreaker Name: python-circuitbreaker -Version: 1.3.1 +Version: 1.3.2 Release: 0 Summary: Python implementation of the "Circuit Breaker" Pattern License: BSD-3-Clause URL: https://github.com/fabfuel/circuitbreaker -Source: https://github.com/fabfuel/%{modname}/archive/refs/tags/%{version}.tar.gz#/%{modname}-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/c/%{modname}/%{modname}-%{version}.tar.gz # PATCH-FIX-UPSTREAM use_stdlib_mock.patch bugno mc...@suse.com # Don't depend on the external mock Patch0: use_stdlib_mock.patch ++++++ circuitbreaker-1.3.1.tar.gz -> circuitbreaker-1.3.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/.gitignore new/circuitbreaker-1.3.2/.gitignore --- old/circuitbreaker-1.3.1/.gitignore 2020-05-21 07:18:15.000000000 +0200 +++ new/circuitbreaker-1.3.2/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,11 +0,0 @@ -.idea -__pycache__ -*.pyc -.cache -.tox -/env -/venv -/circuitbreaker.egg-info -.coverage -/dist -/build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/.travis.yml new/circuitbreaker-1.3.2/.travis.yml --- old/circuitbreaker-1.3.1/.travis.yml 2020-05-21 07:18:15.000000000 +0200 +++ new/circuitbreaker-1.3.2/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -language: python -python: - - "2.7" - - "3.5" - - "3.6" -install: pip install tox-travis -script: tox -after_script: - - pip install scrutinizer-ocular - - ocular --data-file ".coverage" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/MANIFEST.in new/circuitbreaker-1.3.2/MANIFEST.in --- old/circuitbreaker-1.3.1/MANIFEST.in 2020-05-21 07:18:15.000000000 +0200 +++ new/circuitbreaker-1.3.2/MANIFEST.in 2021-10-27 14:47:09.000000000 +0200 @@ -1,2 +1,3 @@ include README.rst include LICENSE.rst +include tests/* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/PKG-INFO new/circuitbreaker-1.3.2/PKG-INFO --- old/circuitbreaker-1.3.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/circuitbreaker-1.3.2/PKG-INFO 2021-10-27 14:50:58.793822500 +0200 @@ -0,0 +1,164 @@ +Metadata-Version: 1.1 +Name: circuitbreaker +Version: 1.3.2 +Summary: Python Circuit Breaker pattern implementation +Home-page: https://github.com/fabfuel/circuitbreaker +Author: Fabian Fuelling +Author-email: p...@fabfuel.de +License: BSD-3-Clause +Download-URL: https://github.com/fabfuel/circuitbreaker/archive/1.3.1.tar.gz +Description: CircuitBreaker + -------------- + + .. image:: https://badge.fury.io/py/circuitbreaker.svg + :target: https://badge.fury.io/py/circuitbreaker + + .. image:: https://travis-ci.org/fabfuel/circuitbreaker.svg?branch=master + :target: https://travis-ci.org/fabfuel/circuitbreaker + + .. image:: https://scrutinizer-ci.com/g/fabfuel/circuitbreaker/badges/coverage.png?b=master + :target: https://scrutinizer-ci.com/g/fabfuel/circuitbreaker + + .. image:: https://scrutinizer-ci.com/g/fabfuel/circuitbreaker/badges/quality-score.png?b=master + :target: https://scrutinizer-ci.com/g/fabfuel/circuitbreaker + + This is a Python implementation of the "Circuit Breaker" Pattern (http://martinfowler.com/bliki/CircuitBreaker.html). + Inspired by Michael T. Nygard's highly recommendable book *Release It!* (https://pragprog.com/book/mnee/release-it). + + + Installation + ------------ + + The project is available on PyPI. Simply run:: + + $ pip install circuitbreaker + + + Usage + ----- + + This is the simplest example. Just decorate a function with the ``@circuit`` decorator:: + + from circuitbreaker import circuit + + @circuit + def external_call(): + ... + + + This decorator sets up a circuit breaker with the default settings. The circuit breaker: + + - monitors the function execution and counts failures + - resets the failure count after every successful execution (while it is closed) + - opens and prevents further executions after 5 subsequent failures + - switches to half-open and allows one test-execution after 30 seconds recovery timeout + - closes if the test-execution succeeded + - considers all raised exceptions (based on class ``Exception``) as an expected failure + - is named "external_call" - the name of the function it decorates + + + What does *failure* mean? + ========================= + A *failure* is a raised exception, which was not caught during the function call. + By default, the circuit breaker listens for all exceptions based on the class ``Exception``. + That means, that all exceptions raised during the function call are considered as an + "expected failure" and will increase the failure count. + + Get specific about the expected failure + ======================================= + It is important, to be **as specific as possible**, when defining the expected exception. + The main purpose of a circuit breaker is to protect your distributed system from a cascading failure. + That means, you probably want to open the circuit breaker only, if the integration point on the other + end is unavailable. So e.g. if there is an ``ConnectionError`` or a request ``Timeout``. + + If you are e.g. using the requests library (http://docs.python-requests.org/) for making HTTP calls, + its ``RequestException`` class would be a great choice for the ``expected_exception`` parameter. + + All recognized exceptions will be re-raised anyway, but the goal is, to let the circuit breaker only + recognize those exceptions which are related to the communication to your integration point. + + When it comes to monitoring (see Monitoring_), it may lead to falsy conclusions, if a + circuit breaker opened, due to a local ``OSError`` or ``KeyError``, etc. + + + Configuration + ------------- + The following configuration options can be adjusted via decorator parameters. For example:: + + from circuitbreaker import circuit + + @circuit(failure_threshold=10, expected_exception=ConnectionError) + def external_call(): + ... + + + + failure threshold + ================= + By default, the circuit breaker opens after 5 subsequent failures. You can adjust this value with the ``failure_threshold`` parameter. + + recovery timeout + ================ + By default, the circuit breaker stays open for 30 seconds to allow the integration point to recover. + You can adjust this value with the ``recovery_timeout`` parameter. + + expected exception + ================== + By default, the circuit breaker listens for all exceptions which are based on the ``Exception`` class. + You can adjust this with the ``expected_exception`` parameter. It can be either an exception class or a tuple of exception classes. + + name + ==== + By default, the circuit breaker name is the name of the function it decorates. You can adjust the name with parameter ``name``. + + + Advanced Usage + -------------- + If you apply circuit breakers to a couple of functions and you always set specific options other than the default values, + you can extend the ``CircuitBreaker`` class and create your own circuit breaker subclass instead:: + + from circuitbreaker import CircuitBreaker + + class MyCircuitBreaker(CircuitBreaker): + FAILURE_THRESHOLD = 10 + RECOVERY_TIMEOUT = 60 + EXPECTED_EXCEPTION = RequestException + + + Now you have two options to apply your circuit breaker to a function. As an Object directly:: + + @MyCircuitBreaker() + def external_call(): + ... + + Please note, that the circuit breaker class has to be initialized, you have to use a class instance as decorator (``@MyCircuitBreaker()``), not the class itself (``@MyCircuitBreaker``). + + Or via the decorator proxy:: + + @circuit(cls=MyCircuitBreaker) + def external_call(): + ... + + + .. _Monitoring: + + Monitoring + ---------- + To keep track of the health of your application and the state of your circuit breakers, every circuit breaker registers itself at the ``CircuitBreakerMonitor``. You can receive all registered circuit breakers via ``CircuitBreakerMonitor.get_circuits()``. + + To get an aggregated health status, you can ask the Monitor via ``CircuitBreakerMonitor.all_closed()``. Or you can retrieve the currently open circuits via ``CircuitBreakerMonitor.get_open()`` and the closed circuits via ``CircuitBreakerMonitor.get_closed()``. + + + Todo + ---- + - add unit tests + +Platform: any +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: POSIX +Classifier: Operating System :: MacOS +Classifier: Operating System :: Unix +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/circuitbreaker.egg-info/PKG-INFO new/circuitbreaker-1.3.2/circuitbreaker.egg-info/PKG-INFO --- old/circuitbreaker-1.3.1/circuitbreaker.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/circuitbreaker-1.3.2/circuitbreaker.egg-info/PKG-INFO 2021-10-27 14:50:58.000000000 +0200 @@ -0,0 +1,164 @@ +Metadata-Version: 1.1 +Name: circuitbreaker +Version: 1.3.2 +Summary: Python Circuit Breaker pattern implementation +Home-page: https://github.com/fabfuel/circuitbreaker +Author: Fabian Fuelling +Author-email: p...@fabfuel.de +License: BSD-3-Clause +Download-URL: https://github.com/fabfuel/circuitbreaker/archive/1.3.1.tar.gz +Description: CircuitBreaker + -------------- + + .. image:: https://badge.fury.io/py/circuitbreaker.svg + :target: https://badge.fury.io/py/circuitbreaker + + .. image:: https://travis-ci.org/fabfuel/circuitbreaker.svg?branch=master + :target: https://travis-ci.org/fabfuel/circuitbreaker + + .. image:: https://scrutinizer-ci.com/g/fabfuel/circuitbreaker/badges/coverage.png?b=master + :target: https://scrutinizer-ci.com/g/fabfuel/circuitbreaker + + .. image:: https://scrutinizer-ci.com/g/fabfuel/circuitbreaker/badges/quality-score.png?b=master + :target: https://scrutinizer-ci.com/g/fabfuel/circuitbreaker + + This is a Python implementation of the "Circuit Breaker" Pattern (http://martinfowler.com/bliki/CircuitBreaker.html). + Inspired by Michael T. Nygard's highly recommendable book *Release It!* (https://pragprog.com/book/mnee/release-it). + + + Installation + ------------ + + The project is available on PyPI. Simply run:: + + $ pip install circuitbreaker + + + Usage + ----- + + This is the simplest example. Just decorate a function with the ``@circuit`` decorator:: + + from circuitbreaker import circuit + + @circuit + def external_call(): + ... + + + This decorator sets up a circuit breaker with the default settings. The circuit breaker: + + - monitors the function execution and counts failures + - resets the failure count after every successful execution (while it is closed) + - opens and prevents further executions after 5 subsequent failures + - switches to half-open and allows one test-execution after 30 seconds recovery timeout + - closes if the test-execution succeeded + - considers all raised exceptions (based on class ``Exception``) as an expected failure + - is named "external_call" - the name of the function it decorates + + + What does *failure* mean? + ========================= + A *failure* is a raised exception, which was not caught during the function call. + By default, the circuit breaker listens for all exceptions based on the class ``Exception``. + That means, that all exceptions raised during the function call are considered as an + "expected failure" and will increase the failure count. + + Get specific about the expected failure + ======================================= + It is important, to be **as specific as possible**, when defining the expected exception. + The main purpose of a circuit breaker is to protect your distributed system from a cascading failure. + That means, you probably want to open the circuit breaker only, if the integration point on the other + end is unavailable. So e.g. if there is an ``ConnectionError`` or a request ``Timeout``. + + If you are e.g. using the requests library (http://docs.python-requests.org/) for making HTTP calls, + its ``RequestException`` class would be a great choice for the ``expected_exception`` parameter. + + All recognized exceptions will be re-raised anyway, but the goal is, to let the circuit breaker only + recognize those exceptions which are related to the communication to your integration point. + + When it comes to monitoring (see Monitoring_), it may lead to falsy conclusions, if a + circuit breaker opened, due to a local ``OSError`` or ``KeyError``, etc. + + + Configuration + ------------- + The following configuration options can be adjusted via decorator parameters. For example:: + + from circuitbreaker import circuit + + @circuit(failure_threshold=10, expected_exception=ConnectionError) + def external_call(): + ... + + + + failure threshold + ================= + By default, the circuit breaker opens after 5 subsequent failures. You can adjust this value with the ``failure_threshold`` parameter. + + recovery timeout + ================ + By default, the circuit breaker stays open for 30 seconds to allow the integration point to recover. + You can adjust this value with the ``recovery_timeout`` parameter. + + expected exception + ================== + By default, the circuit breaker listens for all exceptions which are based on the ``Exception`` class. + You can adjust this with the ``expected_exception`` parameter. It can be either an exception class or a tuple of exception classes. + + name + ==== + By default, the circuit breaker name is the name of the function it decorates. You can adjust the name with parameter ``name``. + + + Advanced Usage + -------------- + If you apply circuit breakers to a couple of functions and you always set specific options other than the default values, + you can extend the ``CircuitBreaker`` class and create your own circuit breaker subclass instead:: + + from circuitbreaker import CircuitBreaker + + class MyCircuitBreaker(CircuitBreaker): + FAILURE_THRESHOLD = 10 + RECOVERY_TIMEOUT = 60 + EXPECTED_EXCEPTION = RequestException + + + Now you have two options to apply your circuit breaker to a function. As an Object directly:: + + @MyCircuitBreaker() + def external_call(): + ... + + Please note, that the circuit breaker class has to be initialized, you have to use a class instance as decorator (``@MyCircuitBreaker()``), not the class itself (``@MyCircuitBreaker``). + + Or via the decorator proxy:: + + @circuit(cls=MyCircuitBreaker) + def external_call(): + ... + + + .. _Monitoring: + + Monitoring + ---------- + To keep track of the health of your application and the state of your circuit breakers, every circuit breaker registers itself at the ``CircuitBreakerMonitor``. You can receive all registered circuit breakers via ``CircuitBreakerMonitor.get_circuits()``. + + To get an aggregated health status, you can ask the Monitor via ``CircuitBreakerMonitor.all_closed()``. Or you can retrieve the currently open circuits via ``CircuitBreakerMonitor.get_open()`` and the closed circuits via ``CircuitBreakerMonitor.get_closed()``. + + + Todo + ---- + - add unit tests + +Platform: any +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: POSIX +Classifier: Operating System :: MacOS +Classifier: Operating System :: Unix +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/circuitbreaker.egg-info/SOURCES.txt new/circuitbreaker-1.3.2/circuitbreaker.egg-info/SOURCES.txt --- old/circuitbreaker-1.3.1/circuitbreaker.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/circuitbreaker-1.3.2/circuitbreaker.egg-info/SOURCES.txt 2021-10-27 14:50:58.000000000 +0200 @@ -0,0 +1,13 @@ +LICENSE.rst +MANIFEST.in +README.rst +circuitbreaker.py +setup.py +circuitbreaker.egg-info/PKG-INFO +circuitbreaker.egg-info/SOURCES.txt +circuitbreaker.egg-info/dependency_links.txt +circuitbreaker.egg-info/not-zip-safe +circuitbreaker.egg-info/requires.txt +circuitbreaker.egg-info/top_level.txt +tests/test_functional.py +tests/test_unit.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/circuitbreaker.egg-info/dependency_links.txt new/circuitbreaker-1.3.2/circuitbreaker.egg-info/dependency_links.txt --- old/circuitbreaker-1.3.1/circuitbreaker.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/circuitbreaker-1.3.2/circuitbreaker.egg-info/dependency_links.txt 2021-10-27 14:50:58.000000000 +0200 @@ -0,0 +1 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/circuitbreaker.egg-info/not-zip-safe new/circuitbreaker-1.3.2/circuitbreaker.egg-info/not-zip-safe --- old/circuitbreaker-1.3.1/circuitbreaker.egg-info/not-zip-safe 1970-01-01 01:00:00.000000000 +0100 +++ new/circuitbreaker-1.3.2/circuitbreaker.egg-info/not-zip-safe 2021-10-27 14:31:58.000000000 +0200 @@ -0,0 +1 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/circuitbreaker.egg-info/requires.txt new/circuitbreaker-1.3.2/circuitbreaker.egg-info/requires.txt --- old/circuitbreaker-1.3.1/circuitbreaker.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/circuitbreaker-1.3.2/circuitbreaker.egg-info/requires.txt 2021-10-27 14:50:58.000000000 +0200 @@ -0,0 +1,3 @@ + +[:python_version < "3.5"] +typing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/circuitbreaker.egg-info/top_level.txt new/circuitbreaker-1.3.2/circuitbreaker.egg-info/top_level.txt --- old/circuitbreaker-1.3.1/circuitbreaker.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/circuitbreaker-1.3.2/circuitbreaker.egg-info/top_level.txt 2021-10-27 14:50:58.000000000 +0200 @@ -0,0 +1 @@ +circuitbreaker diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/requirements.txt new/circuitbreaker-1.3.2/requirements.txt --- old/circuitbreaker-1.3.1/requirements.txt 2020-05-21 07:18:15.000000000 +0200 +++ new/circuitbreaker-1.3.2/requirements.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -typing; python_version < '3.5' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/requirements_dev.txt new/circuitbreaker-1.3.2/requirements_dev.txt --- old/circuitbreaker-1.3.1/requirements_dev.txt 2020-05-21 07:18:15.000000000 +0200 +++ new/circuitbreaker-1.3.2/requirements_dev.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -mock -pytest -pytest-flake8 -pytest-mock -pytest-cov -coverage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/setup.cfg new/circuitbreaker-1.3.2/setup.cfg --- old/circuitbreaker-1.3.1/setup.cfg 1970-01-01 01:00:00.000000000 +0100 +++ new/circuitbreaker-1.3.2/setup.cfg 2021-10-27 14:50:58.794302500 +0200 @@ -0,0 +1,4 @@ +[egg_info] +tag_build = +tag_date = 0 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/setup.py new/circuitbreaker-1.3.2/setup.py --- old/circuitbreaker-1.3.1/setup.py 2020-05-21 07:18:15.000000000 +0200 +++ new/circuitbreaker-1.3.2/setup.py 2021-10-27 14:47:09.000000000 +0200 @@ -13,7 +13,7 @@ setup( name='circuitbreaker', - version='1.3.1', + version='1.3.2', url='https://github.com/fabfuel/circuitbreaker', download_url='https://github.com/fabfuel/circuitbreaker/archive/1.3.1.tar.gz', license='BSD-3-Clause', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/circuitbreaker-1.3.1/tox.ini new/circuitbreaker-1.3.2/tox.ini --- old/circuitbreaker-1.3.1/tox.ini 2020-05-21 07:18:15.000000000 +0200 +++ new/circuitbreaker-1.3.2/tox.ini 1970-01-01 01:00:00.000000000 +0100 @@ -1,27 +0,0 @@ -[tox] -envlist = py27, py35, py36, py37, flake8 - -[testenv:py27] -basepython = python2.7 - -[testenv:py35] -basepython = python3.5 - -[testenv:py36] -basepython = python3.6 - -[testenv:py37] -basepython = python3.7 - -[testenv:flake8] -basepython=python3 -deps=flake8 -commands=flake8 circuitbreaker - -[testenv] -setenv = - PYTHONPATH = {toxinidir}:{toxinidir}/circuitbreaker -deps = - -r{toxinidir}/requirements.txt - -r{toxinidir}/requirements_dev.txt -commands=py.test tests --cov circuitbreaker {posargs}