Skip to content
Snippets Groups Projects
Commit 67724e15 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Merge branch 'pyyaml-51-load-deprecation' into 'master'

Requires pyyaml>=5.1, remove deprecation warnings

See merge request !45
parents 0f56af89 34924819
No related branches found
No related tags found
1 merge request!45Requires pyyaml>=5.1, remove deprecation warnings
Pipeline #29410 passed
......@@ -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')
......
......@@ -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
......
......@@ -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))
......
......@@ -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']
......
......@@ -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']
......
......@@ -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
......
......@@ -40,7 +40,7 @@ requirements:
- python-gitlab
- requests
- sphinx
- pyyaml
- pyyaml >=5.1
- twine
- lxml
- jinja2
......
......@@ -17,7 +17,7 @@ requires = [
'gitpython',
'python-gitlab',
'sphinx',
'pyyaml',
'pyyaml>=5.1',
'twine',
'lxml',
'jinja2',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment