diff --git a/conda_build/config.py b/conda_build/config.py index e1bba06518..2f29d63201 100644 --- a/conda_build/config.py +++ b/conda_build/config.py @@ -913,8 +913,7 @@ def __exit__(self, e_type, e_value, traceback): self.clean(remove_folders=False) -def get_or_merge_config(config, variant=None, **kwargs): - """Always returns a new object - never changes the config that might be passed in.""" +def _get_or_merge_config(config, variant=None, **kwargs): if not config: config = Config(variant=variant) else: @@ -928,6 +927,11 @@ def get_or_merge_config(config, variant=None, **kwargs): return config +def get_or_merge_config(config, variant=None, **kwargs): + """Always returns a new object - never changes the config that might be passed in.""" + return _get_or_merge_config(config, variant=variant, **kwargs) + + def get_channel_urls(args): channel_urls = args.get("channel") or args.get("channels") or () final_channel_urls = [] diff --git a/tests/conftest.py b/tests/conftest.py index 3aca5b4bc7..945277f4c1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,6 +14,7 @@ import conda_build.config from conda_build.config import ( Config, + _get_or_merge_config, _src_cache_root_default, conda_pkg_format_default, enable_static_default, @@ -21,7 +22,6 @@ error_overlinking_default, exit_on_verify_error_default, filename_hashing_default, - get_or_merge_config, ignore_verify_codes_default, no_rewrite_stdout_env_default, noarch_python_build_age_default, @@ -121,11 +121,11 @@ def default_testing_config(testing_config, monkeypatch, request): return def get_or_merge_testing_config(config, variant=None, **kwargs): - return get_or_merge_config(config or testing_config, variant, **kwargs) + return _get_or_merge_config(config or testing_config, variant, **kwargs) monkeypatch.setattr( conda_build.config, - "get_or_merge_config", + "_get_or_merge_config", get_or_merge_testing_config, )