[7.4.x] doc: fix EncodingWarnings in examples (#11182)

Co-authored-by: Ran Benita <ran@unusedvar.com>
This commit is contained in:
github-actions[bot]
2023-07-08 19:17:21 +00:00
committed by GitHub
parent a566b78730
commit 6dfe498c77
5 changed files with 7 additions and 7 deletions

View File

@@ -12,7 +12,7 @@ class YamlFile(pytest.File):
# We need a yaml parser, e.g. PyYAML.
import yaml
raw = yaml.safe_load(self.path.open())
raw = yaml.safe_load(self.path.open(encoding="utf-8"))
for name, spec in sorted(raw.items()):
yield YamlItem.from_parent(self, name=name, spec=spec)