From 5dea1d0f23ee87cda7943c82e73b8081b88ea6aaac12ee0377c38a028830fb08 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 13 Oct 2022 06:46:39 +0000 Subject: [PATCH] Accepting request 1010355 from system:homeautomation:home-assistant:unstable - update to version 2.2.1 - Fix type hint for wait generators https://github.com/litl/backoff/issues/177 - Improve type annotation for wait generators from @hauntsaninja - Include exception in details dict of call handlers from @petamas - Improve type hints for call handlers from @cdce8p - Don't use importlib.metadata for __version__ https://github.com/litl/backoff/issues/166 - Fix bug with max_tries/max_time callables https://github.com/litl/backoff/issues/164 - Get max_tries/max_time values for every call fixes #160 (from @jvrsantacruz) - Allow None for jitter keyword arg (typing) - Add raise_on_giveup keyword arg for decorators - Add backoff.runtime wait generator for dynamically setting wait times based on target function return value or exception details - Improve type hints for on_success, on_backoff, on_giveup handlers - Use decorator-specific detail and handler type hints - Optionally use typing_extensions for python 3.7 type hinting - Drop python 3.6 support - Add python 3.10 support OBS-URL: https://build.opensuse.org/request/show/1010355 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-backoff?expand=0&rev=9 --- backoff-1.10.0.tar.gz | 3 --- backoff-2.2.1.tar.gz | 3 +++ python-backoff.changes | 21 +++++++++++++++++++++ python-backoff.spec | 22 ++++++++++++---------- tests.tar.bz2 | 3 --- 5 files changed, 36 insertions(+), 16 deletions(-) delete mode 100644 backoff-1.10.0.tar.gz create mode 100644 backoff-2.2.1.tar.gz delete mode 100644 tests.tar.bz2 diff --git a/backoff-1.10.0.tar.gz b/backoff-1.10.0.tar.gz deleted file mode 100644 index df3f191..0000000 --- a/backoff-1.10.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8fba021fac74055ac05eb7c7bfce4723aedde6cd0a504e5326bcb0bdd6d19a4 -size 13652 diff --git a/backoff-2.2.1.tar.gz b/backoff-2.2.1.tar.gz new file mode 100644 index 0000000..8f6c221 --- /dev/null +++ b/backoff-2.2.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b92e74aac38ec49e97ac899c96c882496c7b09cf4235e8da205e62b2c6c001d +size 20194 diff --git a/python-backoff.changes b/python-backoff.changes index 81b1abd..bfaf622 100644 --- a/python-backoff.changes +++ b/python-backoff.changes @@ -1,3 +1,24 @@ +------------------------------------------------------------------- +Thu Oct 13 06:36:05 UTC 2022 - Adrian Schröter + +- update to version 2.2.1 + - Fix type hint for wait generators https://github.com/litl/backoff/issues/177 + - Improve type annotation for wait generators from @hauntsaninja + - Include exception in details dict of call handlers from @petamas + - Improve type hints for call handlers from @cdce8p + - Don't use importlib.metadata for __version__ https://github.com/litl/backoff/issues/166 + - Fix bug with max_tries/max_time callables https://github.com/litl/backoff/issues/164 + - Get max_tries/max_time values for every call fixes #160 (from @jvrsantacruz) + - Allow None for jitter keyword arg (typing) + - Add raise_on_giveup keyword arg for decorators + - Add backoff.runtime wait generator for dynamically setting wait times based + on target function return value or exception details + - Improve type hints for on_success, on_backoff, on_giveup handlers + - Use decorator-specific detail and handler type hints + - Optionally use typing_extensions for python 3.7 type hinting + - Drop python 3.6 support + - Add python 3.10 support + ------------------------------------------------------------------- Fri Jan 17 16:42:58 UTC 2020 - Marketa Calabkova diff --git a/python-backoff.spec b/python-backoff.spec index eed87fb..bf0fadd 100644 --- a/python-backoff.spec +++ b/python-backoff.spec @@ -1,7 +1,7 @@ # # spec file for package python-backoff # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,22 +18,26 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-backoff -Version: 1.10.0 +Version: 2.2.1 Release: 0 Summary: Function decoration for backoff and retry License: MIT Group: Development/Languages/Python URL: https://github.com/litl/backoff Source0: https://files.pythonhosted.org/packages/source/b/backoff/backoff-%{version}.tar.gz -# https://github.com/litl/backoff/issues/75 -# github repo does not have setup.py -Source1: tests.tar.bz2 +BuildRequires: %{python_module pip} +BuildRequires: %{python_module poetry} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytest-asyncio} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module requests} +BuildRequires: %{python_module responses} # /SECTION %python_subpackages @@ -50,18 +54,16 @@ Decorators support both regular functions for synchronous code and for asynchronous code. %prep -%setup -q -n backoff-%{version} -a1 +%setup -q -n backoff-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# will not work with python 2.7 -rm -r tests/python35 %pytest %files %{python_files} diff --git a/tests.tar.bz2 b/tests.tar.bz2 deleted file mode 100644 index ec56c31..0000000 --- a/tests.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fdfc2863dc193ecf68ba0b1bdec0690f59bcff0734ec692436e62688fd3bd11c -size 4703