From 6ca971439939dba0a5d81739c82e709cc7a51374 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Mon, 12 Aug 2019 10:27:00 +0200 Subject: [PATCH] Tools: Update PyYAML version. Fixes #2278. --- tools/generation/requirements.txt | 2 +- tools/lint/lib/checks/harnessfeatures.py | 2 +- tools/lint/lib/frontmatter.py | 2 +- tools/lint/requirements.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/generation/requirements.txt b/tools/generation/requirements.txt index efb082d8dec..14ff6344020 100644 --- a/tools/generation/requirements.txt +++ b/tools/generation/requirements.txt @@ -1 +1 @@ -PyYAML==3.11 +PyYAML==5.1.2 diff --git a/tools/lint/lib/checks/harnessfeatures.py b/tools/lint/lib/checks/harnessfeatures.py index 18d7dd0fd81..dc33f6beeef 100644 --- a/tools/lint/lib/checks/harnessfeatures.py +++ b/tools/lint/lib/checks/harnessfeatures.py @@ -9,7 +9,7 @@ class CheckHarnessFeatures(Check): def __init__(self): with open('./harness/features.yml', 'r') as f: - self.include_has_features = yaml.load(f.read()) + self.include_has_features = yaml.safe_load(f.read()) def comparison_result_lists(self, meta): diff --git a/tools/lint/lib/frontmatter.py b/tools/lint/lib/frontmatter.py index 34edd1eac68..a43b605cb25 100644 --- a/tools/lint/lib/frontmatter.py +++ b/tools/lint/lib/frontmatter.py @@ -11,6 +11,6 @@ def parse(src): return None try: - return yaml.load(match.group(1)) + return yaml.safe_load(match.group(1)) except (yaml.scanner.ScannerError, yaml.parser.ParserError): return None diff --git a/tools/lint/requirements.txt b/tools/lint/requirements.txt index 8ad73229038..6d47921fad8 100644 --- a/tools/lint/requirements.txt +++ b/tools/lint/requirements.txt @@ -1,2 +1,2 @@ -PyYAML==3.11 +PyYAML==5.1.2 inflect==0.2.5