From 353a59e0449889c7af3e0ea82016cb3eade52b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 14 Mar 2026 15:07:20 +0100 Subject: [PATCH] fix: `python/imports` are optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `imports` key was never required according to CEP 14 or the reference. The current versions of rattler-build no longer force it either. See also prefix-dev/rattler-build#2063 Signed-off-by: Michał Górny --- conda_recipe_v2_schema/model.py | 2 +- schema.json | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/conda_recipe_v2_schema/model.py b/conda_recipe_v2_schema/model.py index 7fc56c4..981c379 100644 --- a/conda_recipe_v2_schema/model.py +++ b/conda_recipe_v2_schema/model.py @@ -470,7 +470,7 @@ class ScriptTestElement(StrictBaseModel): class PythonTestElementInner(StrictBaseModel): imports: ConditionalList[NonEmptyStr] = Field( - ..., + None, description="A list of Python imports to check after having installed the built package.", ) pip_check: bool = Field( diff --git a/schema.json b/schema.json index bc26dc4..c3ba529 100644 --- a/schema.json +++ b/schema.json @@ -3555,6 +3555,7 @@ "type": "array" } ], + "default": null, "description": "A list of Python imports to check after having installed the built package.", "title": "Imports" }, @@ -3584,9 +3585,6 @@ "title": "Python Version" } }, - "required": [ - "imports" - ], "title": "PythonTestElementInner", "type": "object" },