Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Work around for #1083 (#1086)" #1094

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions changelogs/fragments/1083-__spec__-is-None.yml

This file was deleted.

2 changes: 2 additions & 0 deletions changelogs/fragments/1094-revert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trivial:
- revert Work around for #1083 (https://github.com/ansible-collections/amazon.aws/pull/1094).
14 changes: 4 additions & 10 deletions plugins/module_utils/cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,7 @@
import time
import functools
import random

try:
import ansible.module_utils.common.warnings as ansible_warnings
ANCIENT_ANSIBLE = False
except ImportError:
ANCIENT_ANSIBLE = True
import ansible.module_utils.common.warnings as ansible_warnings


class BackoffIterator:
Expand Down Expand Up @@ -205,10 +200,9 @@ def backoff(cls, tries=10, delay=3, backoff=1.1, catch_extra_error_codes=None):
"""
# This won't emit a warning (we don't have the context available to us), but will trigger
# sanity failures as we prepare for 6.0.0
if not ANCIENT_ANSIBLE:
ansible_warnings.deprecate(
'CloudRetry.backoff has been deprecated, please use CloudRetry.exponential_backoff instead',
version='6.0.0', collection_name='amazon.aws')
ansible_warnings.deprecate(
'CloudRetry.backoff has been deprecated, please use CloudRetry.exponential_backoff instead',
version='6.0.0', collection_name='amazon.aws')

return cls.exponential_backoff(
retries=tries,
Expand Down