From 9ae20abf0dbf67188efe6ffdee8c1aa95e0a6cb3 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Tue, 14 Jan 2025 10:38:49 +0100 Subject: [PATCH] Remove deprecated boto3 parameter (#2443) SUMMARY Since we dropped support for the old boto SDK (#630) the boto3 parameter for get_aws_region() and get_aws_connection_info() has done nothing. This finally removes the parameter (deprecated #2047) ISSUE TYPE Feature Pull Request COMPONENT NAME plugins/module_utils/botocore.py ADDITIONAL INFORMATION Reviewed-by: Bikouo Aubin Reviewed-by: Alina Buzachis --- changelogs/fragments/2443-boto-final-clean.yml | 3 +++ plugins/module_utils/botocore.py | 16 ---------------- 2 files changed, 3 insertions(+), 16 deletions(-) create mode 100644 changelogs/fragments/2443-boto-final-clean.yml diff --git a/changelogs/fragments/2443-boto-final-clean.yml b/changelogs/fragments/2443-boto-final-clean.yml new file mode 100644 index 00000000000..1dddd80c9f9 --- /dev/null +++ b/changelogs/fragments/2443-boto-final-clean.yml @@ -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). diff --git a/plugins/module_utils/botocore.py b/plugins/module_utils/botocore.py index 85966a9a9be..5970b1e32db 100644 --- a/plugins/module_utils/botocore.py +++ b/plugins/module_utils/botocore.py @@ -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: @@ -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: