Add runtime deprecation warning for six (#86806)

Soft deprecated in ansible-core 2.21

Fixes #86789
This commit is contained in:
Martin Krizek
2026-04-09 08:13:01 +02:00
committed by GitHub
parent 5b10504b5e
commit 073f444052
3 changed files with 12 additions and 2 deletions
+3
View File
@@ -0,0 +1,3 @@
deprecated_features:
- >
``ansible.module_utils.six`` - A runtime deprecation warning is now emitted when importing the ``six`` compatibility library, deprecated in ansible-core 2.21 and planned for removal in ansible-core 2.24 (https://github.com/ansible/ansible/issues/86789).
+9 -1
View File
@@ -33,7 +33,15 @@ import operator
import sys
import types
# deprecated: description="Replace with ansible.module_utils.common.warnings.deprecate for 2.24" core_version="2.22"
from ansible.module_utils.common.warnings import deprecate as _deprecate
_deprecate(
msg="The `ansible.module_utils.six` module is deprecated.",
help_text="Use the Python standard library equivalent instead.",
version="2.24",
)
# The following makes it easier for us to script updates of the bundled code. It is not part of
# upstream six
-1
View File
@@ -272,5 +272,4 @@ test/integration/targets/lineinfile/files/testnoeof.txt trailing-newline # Spec
test/units/errors/fixtures/inputs/long_file.txt trailing-newline
test/units/errors/fixtures/inputs/one_line_file.txt trailing-newline
test/units/errors/fixtures/inputs/short_file_missing_trailing_newline.txt trailing-newline
lib/ansible/module_utils/six/__init__.py pylint:ansible-deprecated-version-comment # TODO: 2.21
.github/RELEASE_NAMES.txt release-names # TODO: 2.21