From d286c2e8b35d8324f0a1d1b9843b0501712ec9e3 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Thu, 17 Feb 2022 16:41:45 -0800 Subject: [PATCH] ansible-test - Fix CParser import in yamllint. --- changelogs/fragments/ansible-test-yaml-import.yaml | 2 ++ .../ansible_test/_util/controller/sanity/yamllint/yamllinter.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/ansible-test-yaml-import.yaml diff --git a/changelogs/fragments/ansible-test-yaml-import.yaml b/changelogs/fragments/ansible-test-yaml-import.yaml new file mode 100644 index 00000000000..76139831698 --- /dev/null +++ b/changelogs/fragments/ansible-test-yaml-import.yaml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-test - Import ``yaml.cyaml.CParser`` instead of ``_yaml.CParser`` in the ``yamllint`` sanity test. diff --git a/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py b/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py index bf9bdd5c86a..f4b361015fd 100644 --- a/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py +++ b/test/lib/ansible_test/_util/controller/sanity/yamllint/yamllinter.py @@ -12,7 +12,7 @@ import yaml from yaml.resolver import Resolver from yaml.constructor import SafeConstructor from yaml.error import MarkedYAMLError -from _yaml import CParser # pylint: disable=no-name-in-module +from yaml.cyaml import CParser from yamllint import linter from yamllint.config import YamlLintConfig