Skip to content

Commit

Permalink
Remove deprecated boto3 parameter (ansible-collections#2443)
Browse files Browse the repository at this point in the history
SUMMARY
Since we dropped support for the old boto SDK (ansible-collections#630) the boto3 parameter for get_aws_region() and get_aws_connection_info() has done nothing.  This finally removes the parameter (deprecated ansible-collections#2047)
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/module_utils/botocore.py
ADDITIONAL INFORMATION

Reviewed-by: Bikouo Aubin
Reviewed-by: Alina Buzachis
  • Loading branch information
tremble authored and alinabuzachis committed Jan 15, 2025
1 parent e49ca78 commit c351d25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/2443-boto-final-clean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
breaking_changes:
- module_utils.botocore - drop deprecated ``boto3`` parameter for ``get_aws_region()`` and ``get_aws_connection_info()``, this parameter has had no effect since release 4.0.0 (https://github.com/ansible-collections/amazon.aws/pull/2443).
16 changes: 0 additions & 16 deletions plugins/module_utils/botocore.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,7 @@ def _aws_region(params: Dict) -> Optional[str]:

def get_aws_region(
module: AnsibleAWSModule,
boto3: Optional[bool] = None,
) -> Optional[str]: # pylint: disable=redefined-outer-name
if boto3 is not None:
module.deprecate(
"get_aws_region(): the boto3 parameter will be removed in a release after 2025-05-01. "
"The parameter has been ignored since release 4.0.0.",
date="2025-05-01",
collection_name="amazon.aws",
)
try:
return _aws_region(module.params)
except AnsibleBotocoreError as e:
Expand Down Expand Up @@ -302,15 +294,7 @@ def _aws_connection_info(params: Dict) -> Tuple[Optional[str], Optional[str], Di

def get_aws_connection_info(
module: AnsibleAWSModule,
boto3: Optional[bool] = None,
) -> Tuple[Optional[str], Optional[str], Dict]: # pylint: disable=redefined-outer-name
if boto3 is not None:
module.deprecate(
"get_aws_connection_info(): the boto3 parameter will be removed in a release after 2025-05-01. "
"The parameter has been ignored since release 4.0.0.",
date="2025-05-01",
collection_name="amazon.aws",
)
try:
return _aws_connection_info(module.params)
except AnsibleBotocoreError as e:
Expand Down

0 comments on commit c351d25

Please sign in to comment.