From d68a6851b4adc5e12a2daa55c16b853412bce332 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 25 Feb 2024 17:51:29 +0100 Subject: [PATCH] do not include broken by default --- conda_smithy/configure_feedstock.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py index 475a33f4a..92fbeb727 100644 --- a/conda_smithy/configure_feedstock.py +++ b/conda_smithy/configure_feedstock.py @@ -2188,7 +2188,7 @@ def _load_forge_config(forge_dir, exclusive_config_file, forge_yml=None): return config -def get_most_recent_version(name, only_not_broken=False): +def get_most_recent_version(name, include_broken=False): from conda_build.conda_interface import VersionOrder request = requests.get( @@ -2196,7 +2196,7 @@ def get_most_recent_version(name, only_not_broken=False): ) request.raise_for_status() files = request.json()["files"] - if only_not_broken: + if not include_broken: files = [f for f in files if "broken" not in f.get("labels", ())] pkg = max(files, key=lambda x: VersionOrder(x["version"])) @@ -2207,9 +2207,7 @@ def get_most_recent_version(name, only_not_broken=False): def check_version_uptodate(name, installed_version, error_on_warn): from conda_build.conda_interface import VersionOrder - most_recent_version = get_most_recent_version( - name, only_not_broken=True - ).version + most_recent_version = get_most_recent_version(name).version if installed_version is None: msg = "{} is not installed in conda-smithy's environment.".format(name) elif VersionOrder(installed_version) < VersionOrder(most_recent_version):