From d7a975158eaa40e5c173955cf194ccb105df5bec Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Tue, 30 Jan 2024 15:35:43 +0100 Subject: [PATCH] Fix environ.get_package_records deprecation warning Signed-off-by: Marcel Bargull --- conda_build/environ.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/conda_build/environ.py b/conda_build/environ.py index f70f806f75..3026f1bf60 100644 --- a/conda_build/environ.py +++ b/conda_build/environ.py @@ -850,8 +850,7 @@ def package_specs(self): last_index_ts = 0 -@deprecated("24.1.0", "24.3.0", addendum="Use `get_package_records` instead.") -def get_install_actions( +def get_package_records( prefix, specs, env, @@ -998,10 +997,11 @@ def get_install_actions( utils.trim_empty_keys(actions) cached_actions[(specs, env, subdir, channel_urls, disable_pip)] = actions.copy() last_index_ts = index_ts - return actions + return actions.get(LINK_ACTION, []) -def get_package_records( +@deprecated("24.1.0", "24.3.0", addendum="Use `get_package_records` instead.") +def get_install_actions( prefix, specs, env, @@ -1017,7 +1017,7 @@ def get_package_records( output_folder=None, channel_urls=None, ): - return get_install_actions( + precs = get_package_records( prefix=prefix, specs=specs, env=env, @@ -1032,7 +1032,8 @@ def get_package_records( max_env_retry=max_env_retry, output_folder=output_folder, channel_urls=channel_urls, - ).get(LINK_ACTION, []) + ) + return {PREFIX_ACTION: prefix, LINK_ACTION: precs} @deprecated.argument("24.1.0", "24.3.0", "specs_or_actions", rename="specs_or_precs")