From d1a0f697cec709aca2307b6d5aec108244df451f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakov=20Smoli=C4=87?= Date: Wed, 27 May 2026 17:09:01 +0200 Subject: [PATCH] solver.py: Raise the exception in conda-build if needed If we don't do this conda-build can run into errors if it doesn't receive the correct exception type. This caused many test failures when running conda-build test suite with rattler solver in https://github.com/conda/conda-build/pull/5989 --- conda_rattler_solver/solver.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/conda_rattler_solver/solver.py b/conda_rattler_solver/solver.py index 94cdcad..7d9f6f2 100644 --- a/conda_rattler_solver/solver.py +++ b/conda_rattler_solver/solver.py @@ -657,6 +657,13 @@ def _maybe_raise_for_problems( unsatisfiable[spec.name] = spec else: not_found[spec.name] = spec + + # Raise the exception for conda-build if needed + self._maybe_raise_for_conda_build( + {**unsatisfiable, **not_found}, + message=problems, + ) + if not unsatisfiable and not_found: log.debug( "Inferred PackagesNotFoundError %s from conflicts:\n%s",