diff --git a/bob/devtools/build.py b/bob/devtools/build.py index 83fd6c800c8bf6ea6492595fdf53403c8385750b..5b6513ef11e1a7d7868af3f8e560d60209e6555f 100644 --- a/bob/devtools/build.py +++ b/bob/devtools/build.py @@ -172,7 +172,7 @@ def get_parsed_recipe(metadata): '''Renders the recipe and returns the interpreted YAML file''' output = conda_build.api.output_yaml(metadata[0][0]) - return yaml.load(output) + return yaml.load(output, Loader=yaml.FullLoader) def exists_on_channel(channel_url, basename): @@ -627,7 +627,7 @@ if __name__ == '__main__': condarc = os.path.join(args.conda_root, 'condarc') logger.info('Loading (this build\'s) CONDARC file from %s...', condarc) with open(condarc, 'rb') as f: - condarc_options = yaml.load(f) + condarc_options = yaml.load(f, Loader=yaml.FullLoader) # dump packages at conda_root prefix = get_env_directory(os.environ['CONDA_EXE'], 'base') diff --git a/bob/devtools/scripts/build.py b/bob/devtools/scripts/build.py index b716efa9b2d0e5dde9d174e48b57a3191cc39e86..450d99ef901e79e97999fe2fe2577ef8f3c48d38 100644 --- a/bob/devtools/scripts/build.py +++ b/bob/devtools/scripts/build.py @@ -104,12 +104,12 @@ def build(recipe_dir, python, condarc, config, no_test, append_file, if condarc is not None: logger.info('Loading CONDARC file from %s...', condarc) with open(condarc, 'rb') as f: - condarc_options = yaml.load(f) + condarc_options = yaml.load(f, Loader=yaml.FullLoader) else: # use default and add channels all_channels = ['local'] if use_local else [] all_channels += channels + ['defaults'] - condarc_options = yaml.load(BASE_CONDARC) #n.b.: no channels + condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) logger.info('Using the following channels during build:\n - %s', '\n - '.join(all_channels)) condarc_options['channels'] = all_channels diff --git a/bob/devtools/scripts/ci.py b/bob/devtools/scripts/ci.py index 13cd02fa396fb9c383e3c7198aeb5d8c027594f0..35a4f31d887d0f3c5bf3f1072b5c5083762e1b48 100644 --- a/bob/devtools/scripts/ci.py +++ b/bob/devtools/scripts/ci.py @@ -269,7 +269,7 @@ def base_build(order, group, python, dry_run): if os.path.exists(condarc): logger.info('Loading (this build\'s) CONDARC file from %s...', condarc) with open(condarc, 'rb') as f: - condarc_options = yaml.load(f) + condarc_options = yaml.load(f, Loader=yaml.FullLoader) else: #not building on the CI? - use defaults from ..bootstrap import get_channels @@ -279,7 +279,7 @@ def base_build(order, group, python, dry_run): intranet='True', group='bob') # use default and add channels - condarc_options = yaml.load(BASE_CONDARC) #n.b.: no channels + condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) channels = ['local'] + channels + ['defaults'] logger.info('Using the following channels during build:\n - %s', '\n - '.join(channels)) diff --git a/bob/devtools/scripts/create.py b/bob/devtools/scripts/create.py index 77f09a64e3aa8c9318cc46199ff0d91a1099e5a9..f9e50e66fe1b144a4aed76588b0f5a68735d7528 100644 --- a/bob/devtools/scripts/create.py +++ b/bob/devtools/scripts/create.py @@ -131,10 +131,10 @@ def create(name, recipe_dir, python, overwrite, condarc, use_local, config, if condarc is not None: logger.info('Loading CONDARC file from %s...', condarc) with open(condarc, 'rb') as f: - condarc_options = yaml.load(f) + condarc_options = yaml.load(f, Loader=yaml.FullLoader) else: # use default and add channels - condarc_options = yaml.load(BASE_CONDARC) #n.b.: no channels + condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) channels = get_channels(public=(not private), stable=stable, server=server, intranet=private, group=group) condarc_options['channels'] = channels + ['defaults'] diff --git a/bob/devtools/scripts/rebuild.py b/bob/devtools/scripts/rebuild.py index 18880e89ff57f044dea83e5dbdc9f6600311e83b..b97f5bea89bf52a0d1fe6d768817c2318b78ee6a 100644 --- a/bob/devtools/scripts/rebuild.py +++ b/bob/devtools/scripts/rebuild.py @@ -96,10 +96,10 @@ def rebuild(recipe_dir, python, condarc, config, append_file, if condarc is not None: logger.info('Loading CONDARC file from %s...', condarc) with open(condarc, 'rb') as f: - condarc_options = yaml.load(f) + condarc_options = yaml.load(f, Loader=yaml.FullLoader) else: # use default and add channels - condarc_options = yaml.load(BASE_CONDARC) #n.b.: no channels + condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) logger.info('Using the following channels during build:\n - %s', '\n - '.join(channels + ['defaults'])) condarc_options['channels'] = channels + ['defaults'] diff --git a/bob/devtools/scripts/test.py b/bob/devtools/scripts/test.py index 2c389827ccbef6dff0a8f6e6ad215dc0833aa004..f02fbb8b01d33ba005485e9bff511d1fce74f763 100644 --- a/bob/devtools/scripts/test.py +++ b/bob/devtools/scripts/test.py @@ -93,12 +93,12 @@ def test(package, condarc, config, append_file, server, group, private, stable, if condarc is not None: logger.info('Loading CONDARC file from %s...', condarc) with open(condarc, 'rb') as f: - condarc_options = yaml.load(f) + condarc_options = yaml.load(f, Loader=yaml.FullLoader) else: # use default and add channels all_channels = ['local'] if use_local else [] all_channels += channels + ['defaults'] - condarc_options = yaml.load(BASE_CONDARC) #n.b.: no channels + condarc_options = yaml.load(BASE_CONDARC, Loader=yaml.FullLoader) logger.info('Using the following channels during build:\n - %s', '\n - '.join(all_channels)) condarc_options['channels'] = all_channels diff --git a/conda/meta.yaml b/conda/meta.yaml index 4a0974dc040f4d9cc5de41f1b2c6db8580b4af2f..f7f83bc7400a64435bbff1584308ff95fd40429c 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -40,7 +40,7 @@ requirements: - python-gitlab - requests - sphinx - - pyyaml + - pyyaml >=5.1 - twine - lxml - jinja2 diff --git a/setup.py b/setup.py index b121828c3c8bf16acbd78737282cfe1ee29d1da2..9ab371458b55f96d0419f255ce5ea963a5be58e3 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ requires = [ 'gitpython', 'python-gitlab', 'sphinx', - 'pyyaml', + 'pyyaml>=5.1', 'twine', 'lxml', 'jinja2',