From e1923a9fbee026f8869784d57053ea3217b70dc907361e1e88fca1a2a34a7fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 5 Sep 2024 08:58:33 +0000 Subject: [PATCH 1/2] Changes needed to build package on 15.6 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tenacity?expand=0&rev=55 --- .gitattributes | 23 +++ .gitignore | 1 + python-tenacity.changes | 337 ++++++++++++++++++++++++++++++++++++++++ python-tenacity.spec | 73 +++++++++ tenacity-8.4.2.tar.gz | 3 + 5 files changed, 437 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-tenacity.changes create mode 100644 python-tenacity.spec create mode 100644 tenacity-8.4.2.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-tenacity.changes b/python-tenacity.changes new file mode 100644 index 0000000..4c2d825 --- /dev/null +++ b/python-tenacity.changes @@ -0,0 +1,337 @@ +------------------------------------------------------------------- +Sat Jun 29 05:33:50 UTC 2024 - Dirk Müller + +- update to 8.4.2: + * fix: Avoid overwriting local contexts with retry decorator + +------------------------------------------------------------------- +Wed Jun 19 16:52:05 UTC 2024 - Dirk Müller + +- update to 8.4.1: + * Include `tenacity.asyncio` subpackage in release dist +- update to 8.4.0: + * Add async strategies + * Support Trio out-of-the-box + +------------------------------------------------------------------- +Mon Jun 10 07:49:32 UTC 2024 - Dirk Müller + +- update to 8.3.0: + * Added a new stop function: `stop_before_delay`, which will + stop execution if the next sleep time would cause overall + delay to exceed the specified delay. Useful for use cases + where you have some upper bound on retry times that you must + not exceed, so returning before that timeout is preferable + than returning after that timeout. + * Preserve __defaults__ and __kwdefaults__ through retry + decorator +- use PEP517 build + +------------------------------------------------------------------- +Mon Nov 27 16:09:05 UTC 2023 - Dirk Müller + +- update to 3.2.3: + * remove support for python 3.6 + * Fix tests for typeguard 3.x + * Add support for async sleep functions in tenacity.retry + annotation + +------------------------------------------------------------------- +Wed May 31 19:54:37 UTC 2023 - Dirk Müller + +- update to 8.2.2: + * feat: accept datetime.timedelta instances as argument to `stop_after.. + * fix: docstring for wait_exponential_jitter + * fix: remove __iter__ from AsyncRetring + * Add retry_if_exception_cause_type and wait_exponential_jitter + * better wait.WaitBaseT annotation + * CI conversion to GitHub actions + +------------------------------------------------------------------- +Mon May 15 13:57:44 UTC 2023 - Johannes Kastl + +- disable check 'test_retry_type_annotations' that fails due to + `TypeError: check_type() takes 2 positional arguments but 3 were + given` + +------------------------------------------------------------------- +Mon May 8 13:55:28 UTC 2023 - Johannes Kastl + +- add sle15_python_module_pythons + +------------------------------------------------------------------- +Fri Nov 11 13:21:11 UTC 2022 - pgajdos@suse.com + +- silent rpmlint + +------------------------------------------------------------------- +Fri Nov 11 11:38:22 UTC 2022 - pgajdos@suse.com + +- python-six is not required + +------------------------------------------------------------------- +Wed Nov 9 19:19:10 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 8.1.0 (included changes also from 8.0.1, 8.0.0, 7.0.0) + * feat: Add retry_if_exception_cause_type (#362) + * Support `datetime.timedelta` as a valid wait unit type (#342) + * Show All Exception Predicates in Docs (#332) + * Implement a wait.wait_exponential_jitter per Google's storage guide (#351) + * Define a ClientError to fix Sphinx build errors (#352) + * Merge pull request #340 from jd/fix-mergify + * ci: fix Mergify config + * Merge pull request #337 from william-silversmith/master + * docs: show how to use retry_if_not_exception_type + * Rickroll a function name in one of the examples (#331) + * Fix after_log logger format (#317) + * Drop `py2` tag from the wheel name (#320) + * Add a __repr__ method to RetryCallState objects (#302) + * Add type annotations to cover all code. (#315) + * Fix #307 : Drop deprecated APIs (#314) + * Fix DeprecationWarnings in tests (#313) + * Do not package tests with tenacity (#308) + * Fix issue #288 : __name__ and other attributes for async functions (#312) + * Use f-strings instead of `str.format` as faster and easier to read (#311) + * Replace abc.ABCMeta with abc.ABC (#310) + * Remove encoding declarations (#309) + * Merge pull request #306 from penguinolog/black_full_ci + * Use black instead of "flake8-black" on CI. + * Fix #291: drop python < 3.6 (#304) + * Merge pull request #293 from and-semakin/drop_deprecated_pythons + * Drop support for deprecated Python versions (2.7 and 3.5) + * Add retry_if_not_exception_type() (#300) + * Make logger more compatible (#294) + * ci: fix pep8 error (#297) + * Merge pull request #286 from jd/reno-mergify + * Add Python 3.8 in tox.ini + * Fix upload job + * Merge pull request #202 from jd/release-auto + * Release via CircleCI + * Merge pull request #191 from bersace/context-manager + * Merge branch 'master' into context-manager + * Merge pull request #201 from bersace/async + * Ensure coroutine passes asyncio.iscoroutinefunction + * Test async keyword + * Retry code block with context manager + * Merge pull request #200 from Dectinc/master + * Fix setup.cfg typo + * Merge pull request #198 from BATS/py2-compatability-for-_asyncio-module + * Ensure that the _asyncio.py module can be compiled, even on Python 2 + +------------------------------------------------------------------- +Tue Oct 11 15:50:50 UTC 2022 - Yogalakshmi Arunachalam + +- Update to version 8.0.1 + * no upstream changelog + +------------------------------------------------------------------- +Thu Apr 22 20:45:21 UTC 2021 - Dirk Müller + +- update to 6.3.1: + * Make AsyncRetrying callable + * Replace nap.sleep with a method to allow mocking after import + * Always return booleans from all retry_* methods + * Fix asyncio.iscoroutinefunction(f) check for decorated function + * Add call method to AsyncRetying + +------------------------------------------------------------------- +Tue Jun 30 00:36:12 UTC 2020 - Steve Kowalik + +- Update to 6.2.0: + * before_sleep_log: Add an exc_info option to include exception tracebacks + * docs: fix duplicate function names (#226) + * AsyncRetrying can use an async iterator (#222) + * Add minimal type definitions for @retry decorator (#221) +- Add typguard to BuildRequires + +------------------------------------------------------------------- +Mon Apr 20 09:03:44 UTC 2020 - Tomáš Chvátal + +- Fix build without python2 + +------------------------------------------------------------------- +Fri Feb 28 21:45:23 UTC 2020 - Dirk Mueller + +- update to 6.1.0: + * further Python 3.8 fixes + +------------------------------------------------------------------- +Fri Dec 20 18:42:18 UTC 2019 - Dirk Mueller + +- update to 6.0.0 + * Python 3.8 enablement + +------------------------------------------------------------------- +Wed Aug 28 11:46:28 UTC 2019 - Marketa Calabkova + +- update to 5.1.1 + * upstream switched to reno, so no upstream changelog + * Use setuptools_scm for packaging + * Drop Python 3.4 + * Reduce wait_exponential power by 1 so first wait is equal to multiplier + +------------------------------------------------------------------- +Thu Apr 18 14:58:39 UTC 2019 - Marketa Calabkova + +- update to 5.0.4 + * Try using unshallow clone + * Add support for Python 3.7 + * Add test for attempt numbers in interleaved async coroutines + * Fix wait_chain to be runnable multiple times + * Fix six.wraps having a problem with __name__ attr on Py2 + * Add retry_if_exception_message and complement + * RetryCallState: add retry_object & next_action fields + * Tweak wait funcs to accept call_state with backward compat + * Add RetryCallState class + * Documentation fixes + +------------------------------------------------------------------- +Wed Jan 9 23:06:29 UTC 2019 - Jonathan Brownell + +- Use "Requires:" instead of "Recommends:" on older build platforms + +------------------------------------------------------------------- +Tue Dec 4 12:55:05 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Thu Oct 18 21:56:38 UTC 2018 - Jan Engelhardt + +- Use noun phrase in summary. + +------------------------------------------------------------------- +Thu Oct 11 11:56:31 UTC 2018 - Dirk Mueller + +- update to 4.12.0: + * add retry\_error\_callback param + * Fix Mergify conf + * Enable mergify + * Implement before\_sleep logging hook + * Rename tenacity.async to tenacity.\_asyncio + * Remove useless install of nose + * Switch to pytest + * Fix codeblock formatting + * Document how to use Trio/curio + * Catch BaseException rather than just Exception + * Fix pep8 errors + * Only install monotonic on Python 2 + * Stop using pbr to build documentation + * Add \`license\` key to \`setup.cfg\` + * Avoid inspect.getargspec deprecation warning + * Don't fall over if an old version of tornado is installed + * Allow to specify RetryError + +------------------------------------------------------------------- +Wed Jan 10 22:24:53 UTC 2018 - jengelh@inai.de + +- Remove repetition of license terms in description. + +------------------------------------------------------------------- +Wed Jan 10 20:48:41 UTC 2018 - toddrme2178@gmail.com + +- update to 4.8.0 + * Allow waiters to introspect last result +- update to 4.7.1 + * Missed top level import of stop\_when\_event\_set + * Mention Tornado minimum version in README + * Fix unless\_exception test names and add no input test +- update to 4.7.0 + * Add Tornado support + * Fix pep8 +- update to 4.6.1 + * Simplify wrapping code +- update to 4.6.0 + * Implement \`retry\_with' on decorated functions +- Implement single-spec version + +------------------------------------------------------------------- +Thu Nov 2 23:20:11 UTC 2017 - dmueller@suse.com + +- update to 4.5.0: + * Replace hacking with flake8 extensions + * Fix import order + * Put a default sleep attribute on BaseRetrying + * async: allow to specify a different sleep method + * Issue-8: Make sure doc examples run (#89) + * Remove Python 3.4 support + +------------------------------------------------------------------- +Tue Aug 22 06:34:38 UTC 2017 - tbechtold@suse.com + +- update to 4.4.0: + * Document wait\_random\_exponential strategy + * Rename wait\_full\_jitter to wait\_random\_exponential + * Add retry\_unless\_exception\_type + * Add missing ')' to README.rst + * Do not duplicate statistics fields in instance + * Do not start trial\_start\_time as an attribute + * Add an example on how to combine stop conditions + * Put a link to the GitHub issue of retrying about the fork + * feat: added wait\_full\_jitter + * Add new event based sleep and stop + * Add \`wraps' method directly on Retrying object + * wait: handle OverflowError + * doc: raise Exception in example so they actually work + * Remove weird example with retry\_if\_io\_error + * Bump version for new feature + * Add Python 3.6 support + * Add retry\_if\_not\_result class to compliment the existing retry\_if\_result class + * Fix six minimum version + * doc: rewrite the before explanation + * Add \_\_call\_\_ on BaseRetrying class + * Document before and after keywords + * Remove useless MANIFEST + * Remove non-working PyPI download image + * Bump hacking to 0.13 + * Use Python 3 for pep8 tox target + * Remove deprecated wait\_jitter + +------------------------------------------------------------------- +Fri Feb 10 16:06:26 UTC 2017 - tbechtold@suse.com + +- update to 3.7.1: + * Fix pep8 errors + * Correctly set the exception if we TryAgain for ever + +------------------------------------------------------------------- +Sun Dec 18 12:29:45 UTC 2016 - dmueller@suse.com + +- update to 3.6.0: + * Retry on coroutines + * Run flake8 only with latest python + * Deduplicate retry decorator logic + * Extract controller IOs in subclass + * Allow to combine stop conditions + * Add SayThanks + * retry: implement bitwise operators on retry strategies + * retry: add retry_all + +------------------------------------------------------------------- +Fri Dec 2 17:38:01 UTC 2016 - dmueller@suse.com + +- update to 3.4.0: + * Deprecate wait_jitter for wait_random + * Align tox and travis settings + * Fix README typo + * Bump hacking to 0.12 + * Fix README.rst wrong description + * This is using floating point seconds (not milliseconds) + * Some small docstring updates + * Use py3.x compat print in README.rst + * Fix typo in retry_if_exception example + +------------------------------------------------------------------- +Wed Nov 9 14:14:17 UTC 2016 - dmueller@suse.com + +- update to 3.3.0: + * Implement '+' operator for wait strategies + * Rename `_retrying` attribute to `retry` and document it + * Store retrying object as an attribute of retried function + * Make sure statistics are thread locals + +------------------------------------------------------------------- +Mon Sep 26 14:23:36 UTC 2016 - tbechtold@suse.com + +- Initial packaging (version 3.1.1) + diff --git a/python-tenacity.spec b/python-tenacity.spec new file mode 100644 index 0000000..3494f7b --- /dev/null +++ b/python-tenacity.spec @@ -0,0 +1,73 @@ +# +# spec file for package python-tenacity +# +# 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 +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-tenacity +Version: 8.4.2 +Release: 0 +Summary: Python module for retrying code until it succeeeds +License: Apache-2.0 +Group: Development/Languages/Python +URL: https://github.com/jd/tenacity +Source: https://files.pythonhosted.org/packages/source/t/tenacity/tenacity-%{version}.tar.gz +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module tornado6 >= 6.4.1} +BuildRequires: %{python_module typeguard} +BuildRequires: %{python_module typing-extensions} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Recommends: python-tornado6 +BuildArch: noarch +%python_subpackages + +%description +Tenacity is a general-purpose retrying library, written in Python, to simplify +the task of adding retry behavior to just about anything. +It originates from a fork of `Retrying`_ +Features +-------- +- Generic Decorator API +- Specify stop condition (i.e. limit by number of attempts) +- Specify wait condition (i.e. exponential backoff sleeping between attempts) +- Customize retrying on Exceptions +- Customize retrying on expected returned result + +%prep +%setup -q -n tenacity-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest --ignore tenacity/tests/test_asyncio.py -k 'not test_retry_type_annotations' + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/tenacity +%{python_sitelib}/tenacity-%{version}.dist-info + +%changelog diff --git a/tenacity-8.4.2.tar.gz b/tenacity-8.4.2.tar.gz new file mode 100644 index 0000000..16e89f2 --- /dev/null +++ b/tenacity-8.4.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd80a53a79336edba8489e767f729e4f391c896956b57140b5d7511a64bbd3ef +size 46206 From 99ed037131b6d577781c34a5c68c39f68de82645de45539d682f5e485172bb7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 5 Sep 2024 09:19:57 +0000 Subject: [PATCH 2/2] - Fix build on Leap 15.6 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tenacity?expand=0&rev=56 --- python-tenacity.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-tenacity.changes b/python-tenacity.changes index 4c2d825..2e031f8 100644 --- a/python-tenacity.changes +++ b/python-tenacity.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 5 09:19:30 UTC 2024 - Markéta Machová + +- Fix build on Leap 15.6 + ------------------------------------------------------------------- Sat Jun 29 05:33:50 UTC 2024 - Dirk Müller