Merge branch 'faster_yaml' into 'master'

metadata: use yaml C implementation when available

Closes #716

See merge request fdroid/fdroidserver!696
This commit is contained in:
Hans-Christoph Steiner 2019-12-23 10:09:50 +00:00
commit e9830fc4ab
1 changed files with 5 additions and 1 deletions

View File

@ -27,6 +27,10 @@ import logging
import textwrap
import io
import yaml
try:
from yaml import CSafeLoader as SafeLoader
except ImportError:
from yaml import SafeLoader
import importlib
from collections import OrderedDict
@ -1036,7 +1040,7 @@ def parse_json_metadata(mf, app):
def parse_yaml_metadata(mf, app):
yamldata = yaml.safe_load(mf)
yamldata = yaml.load(mf, Loader=SafeLoader)
deprecated_in_yaml = ['Provides']