Update runtime-metadata sanity test for Python 3.10.
This commit is contained in:
parent
8cccabf1eb
commit
5487e9e4fd
2 changed files with 14 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- ansible-test - Update the ``runtime-metadata`` sanity test to handle a new warning on Python 3.10.
|
|
@ -7,6 +7,18 @@ import datetime
|
|||
import os
|
||||
import re
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
# Temporary solution for the PEP 632 deprecation warning on Python 3.10.
|
||||
# This should be removed once distutils.version has been vendored in ansible.module_utils.
|
||||
# See: https://github.com/ansible/ansible/issues/74599
|
||||
# pylint: disable=wrong-import-position
|
||||
warnings.filterwarnings(
|
||||
'ignore',
|
||||
'The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives',
|
||||
DeprecationWarning,
|
||||
)
|
||||
|
||||
from distutils.version import StrictVersion, LooseVersion
|
||||
from functools import partial
|
||||
|
||||
|
|
Loading…
Reference in a new issue