From eeddf2ac3e351ac95f5e5b42de6796758eb79731 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 8 Jan 2025 15:37:38 +0100 Subject: [PATCH] Remove deprecated boto3 parameter --- changelogs/fragments/2441-boto-final-clean.yml | 3 +++ plugins/module_utils/botocore.py | 16 ---------------- 2 files changed, 3 insertions(+), 16 deletions(-) create mode 100644 changelogs/fragments/2441-boto-final-clean.yml diff --git a/changelogs/fragments/2441-boto-final-clean.yml b/changelogs/fragments/2441-boto-final-clean.yml new file mode 100644 index 0000000000..ee7186e4dc --- /dev/null +++ b/changelogs/fragments/2441-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/2441). diff --git a/plugins/module_utils/botocore.py b/plugins/module_utils/botocore.py index 85966a9a9b..5970b1e32d 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: