diff --git a/circuitbreaker-1.3.2.tar.gz b/circuitbreaker-1.3.2.tar.gz deleted file mode 100644 index 15ad884..0000000 --- a/circuitbreaker-1.3.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:747d4ced5c0797e2ab1d3e00a03b312db23e7ec65106148fc63beec25bbba50f -size 7946 diff --git a/circuitbreaker-2.0.0.tar.gz b/circuitbreaker-2.0.0.tar.gz new file mode 100644 index 0000000..1f85275 --- /dev/null +++ b/circuitbreaker-2.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28110761ca81a2accbd6b33186bc8c433e69b0933d85e89f280028dbb8c1dd14 +size 10736 diff --git a/python-circuitbreaker.changes b/python-circuitbreaker.changes index b623c10..6eaa455 100644 --- a/python-circuitbreaker.changes +++ b/python-circuitbreaker.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Tue Aug 27 07:50:27 UTC 2024 - Frantisek Simorda + +- update to 2.0.0: + * Async Support + * Python2 not supported anymore + * Supported Python versions now are: 3.11, 3.10, 3.9, 3.8, 3.7 + +- version 1.4.0: + * Fallback Function + * Custom callable for handling exceptions + * Monotonic clock + * Circuitbreaker default name + * the project is now built on Github Action instead of Travis CI + * building for python 3.10 + * applied smaller flake8 fixes + +- Drop use_stdlib_mock.patch merged upstream + ------------------------------------------------------------------- Wed Oct 27 17:56:18 UTC 2021 - Matej Cepl diff --git a/python-circuitbreaker.spec b/python-circuitbreaker.spec index e2e19c0..d05ed12 100644 --- a/python-circuitbreaker.spec +++ b/python-circuitbreaker.spec @@ -1,7 +1,7 @@ # # spec file for package python-circuitbreaker # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,18 +16,19 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define modname circuitbreaker Name: python-circuitbreaker -Version: 1.3.2 +Version: 2.0.0 Release: 0 Summary: Python implementation of the "Circuit Breaker" Pattern License: BSD-3-Clause URL: https://github.com/fabfuel/circuitbreaker Source: https://files.pythonhosted.org/packages/source/c/%{modname}/%{modname}-%{version}.tar.gz -# PATCH-FIX-UPSTREAM use_stdlib_mock.patch bugno mcepl@suse.com -# Don't depend on the external mock -Patch0: use_stdlib_mock.patch +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module flake8} +BuildRequires: %{python_module pytest-asyncio} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes diff --git a/use_stdlib_mock.patch b/use_stdlib_mock.patch deleted file mode 100644 index b15d89d..0000000 --- a/use_stdlib_mock.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- - tests/test_functional.py | 5 ++++- - tests/test_unit.py | 15 +++++++-------- - 2 files changed, 11 insertions(+), 9 deletions(-) - ---- a/tests/test_functional.py -+++ b/tests/test_functional.py -@@ -1,6 +1,9 @@ - from time import sleep - --from mock.mock import patch, Mock -+try: -+ from unittest.mock import patch, Mock -+except (ImportError, ModuleNotFoundError): -+ from mock import patch, Mock - from pytest import raises - - from circuitbreaker import CircuitBreaker, CircuitBreakerError, \ ---- a/tests/test_unit.py -+++ b/tests/test_unit.py -@@ -1,9 +1,8 @@ - try: -- from unittest.mock import Mock --except ImportError: -- from mock import Mock -+ from unittest.mock import Mock, patch -+except (ImportError, ModuleNotFoundError): -+ from mock import Mock, patch - --from mock.mock import patch - from pytest import raises - - from circuitbreaker import CircuitBreaker, CircuitBreakerError, circuit -@@ -50,7 +49,7 @@ def test_circuitbreaker_should_call_fall - func = Mock(return_value=False) - - CircuitBreaker.opened = lambda self: True -- -+ - cb = CircuitBreaker(name='WithFallback', fallback_function=fallback) - cb.call(func) - fallback.assert_called_once_with() -@@ -61,11 +60,11 @@ def test_circuitbreaker_should_not_call_ - func = Mock(return_value=False) - - CircuitBreaker.opened = lambda self: True -- -+ - cb = CircuitBreaker(name='WithFallback', fallback_function=fallback) - assert cb.call(func) == fallback.return_value - assert not func.called -- -+ - - def mocked_function(*args, **kwargs): - pass -@@ -82,7 +81,7 @@ def test_circuitbreaker_call_fallback_fu - func_decorated('test2',test='test') - - # check args and kwargs are getting correctly to fallback function -- -+ - fallback.assert_called_once_with('test2', test='test') - - @patch('circuitbreaker.CircuitBreaker.decorate')