mirror of
https://github.com/ansible/ansible.git
synced 2026-08-01 00:34:56 +02:00
Add runtime deprecation warning for six (#86806)
Soft deprecated in ansible-core 2.21 Fixes #86789
This commit is contained in:
@@ -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).
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user