heat/heat/objects
Boden R 756dda72d4 Replace retrying with tenacity
We are replacing all usages of the 'retrying' package with
'tenacity' as the author of retrying is not actively maintaining
the project. Tenacity is a fork of retrying, but has improved the
interface and extensibility (see [1] for more details). Our end
goal here is removing the retrying package from our requirements.

Tenacity provides the same functionality as retrying, but has the
following major differences to account for:
- Tenacity uses seconds rather than ms as retrying did.
- Tenacity has different kwargs for the decorator and
Retrying class itself.
- Tenacity has a different approach for retrying args by
using classes for its stop/wait/retry kwargs.
- By default tenacity raises a RetryError if a retried callable
times out; retrying raises the last exception from the callable.
Tenacity provides backwards compatibility here by offering
the 'reraise' kwarg.
- Tenacity defines 'time.sleep' as a default value for a kwarg.
That said consumers who need to mock patch time.sleep
need to account for this via mocking of time.sleep before
tenacity is imported.
- For retries that check a result, tenacity will raise if the retried
function raises, whereas retrying retried on all exceptions.

This patch updates all usages of retrying with tenacity.
Unit tests will be added/removed where applicable.

[1] https://github.com/jd/tenacity

Closes-Bug: #1635388

Change-Id: Iec0822cc0d5589b04c1764db518478d286455031
2016-11-15 04:34:17 +00:00
..
__init__.py Fix some files permissions 2015-08-26 12:11:27 +03:00
base.py Merge "Use a weakref for the data object context" 2016-05-26 05:39:52 +00:00
event.py Use Event versioned object for event_list formatting 2016-06-13 09:39:52 +12:00
fields.py Make JsonField actually do it's work 2016-01-22 21:53:43 +00:00
raw_template.py Always eager load the raw_template for a stack 2016-08-15 22:17:30 +00:00
raw_template_files.py De-duplicate raw_template.files 2016-05-25 15:27:27 -04:00
resource.py Replace retrying with tenacity 2016-11-15 04:34:17 +00:00
resource_data.py Be consistent about context first argument in db api 2016-06-22 10:45:04 +12:00
service.py Add OBJ_PROJECT_NAMESPACE for Heat project 2016-01-22 21:53:51 +00:00
snapshot.py Add OBJ_PROJECT_NAMESPACE for Heat project 2016-01-22 21:53:51 +00:00
software_config.py Add OBJ_PROJECT_NAMESPACE for Heat project 2016-01-22 21:53:51 +00:00
software_deployment.py Add OBJ_PROJECT_NAMESPACE for Heat project 2016-01-22 21:53:51 +00:00
stack.py Don't always eagerly load the raw_template for a stack 2016-10-04 08:25:01 -04:00
stack_lock.py Add context to stack lock function arguments 2016-06-22 10:45:04 +12:00
stack_tag.py Don't query stack tags twice 2016-02-15 05:53:17 +01:00
sync_point.py Add OBJ_PROJECT_NAMESPACE for Heat project 2016-01-22 21:53:51 +00:00
user_creds.py Be consistent about context first argument in db api 2016-06-22 10:45:04 +12:00
watch_data.py Do not populate unused stack and watch rule objects 2016-07-11 09:56:29 +12:00
watch_rule.py Do not populate unused stack and watch rule objects 2016-07-11 09:56:29 +12:00