diff --git a/changelogs/fragments/fetch_url-remove-auto-disable-decompress.yml b/changelogs/fragments/fetch_url-remove-auto-disable-decompress.yml new file mode 100644 index 00000000000..9588483317d --- /dev/null +++ b/changelogs/fragments/fetch_url-remove-auto-disable-decompress.yml @@ -0,0 +1,2 @@ +removed_features: + - "``fetch_url`` - remove auto disabling ``decompress`` when gzip is not available" diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index 077b6afd860..051ffebec2e 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -1865,12 +1865,8 @@ def fetch_url(module, url, data=None, headers=None, method=None, if not HAS_URLPARSE: module.fail_json(msg='urlparse is not installed') - if not HAS_GZIP and decompress is True: - decompress = False - module.deprecate( - '%s. "decompress" has been automatically disabled to prevent a failure' % GzipDecodedReader.missing_gzip_error(), - version='2.16' - ) + if not HAS_GZIP: + module.fail_json(msg=GzipDecodedReader.missing_gzip_error()) # ensure we use proper tempdir old_tempdir = tempfile.tempdir diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index b580357acbb..908aa5f53cf 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -239,7 +239,6 @@ test/units/utils/collection_loader/fixtures/collections_masked/ansible_collectio test/units/utils/collection_loader/fixtures/collections_masked/ansible_collections/testns/testcoll/__init__.py empty-init # testing that collections don't need inits test/units/utils/collection_loader/test_collection_loader.py pylint:undefined-variable # magic runtime local var splatting lib/ansible/executor/play_iterator.py pylint:ansible-deprecated-version -lib/ansible/module_utils/urls.py pylint:ansible-deprecated-version lib/ansible/playbook/helpers.py pylint:ansible-deprecated-version lib/ansible/playbook/included_file.py pylint:ansible-deprecated-version lib/ansible/plugins/action/__init__.py pylint:ansible-deprecated-version