Bump version to 2.0.0 (#1369)

* Bump version to 2.0.0.

* Remove deprecated 2.0.0 features.

* Test for failure.

* Fix cache plugin unit tests.

* Accept direct import only for Ansible 2.9.
This commit is contained in:
Felix Fontein 2020-11-26 14:26:36 +01:00 committed by GitHub
parent 25c52d56bd
commit 1db167b12a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 21 additions and 50 deletions

View file

@ -826,8 +826,7 @@ def main():
supports_check_mode=True,
required_by=dict(
add_children=['xpath'],
# TODO: Reinstate this in community.general 2.0.0 when we have deprecated the incorrect use below
# attribute=['value'],
attribute=['value'],
content=['xpath'],
set_children=['xpath'],
value=['xpath'],
@ -876,12 +875,6 @@ def main():
elif LooseVersion('.'.join(to_native(f) for f in etree.LXML_VERSION)) < LooseVersion('3.0.0'):
module.warn('Using lxml version lower than 3.0.0 does not guarantee predictable element attribute order.')
# Report wrongly used attribute parameter when using content=attribute
# TODO: Remove this in community.general 2.0.0 (and reinstate strict parameter test above) and remove the integration test example
if content == 'attribute' and attribute is not None:
module.deprecate("Parameter 'attribute=%s' is ignored when using 'content=attribute' only 'xpath' is used. Please remove entry." % attribute,
version='2.0.0', collection_name='community.general') # was Ansible 2.12
# Check if the file exists
if xml_string:
infile = BytesIO(to_bytes(xml_string, errors='surrogate_or_strict'))