From 4ccf8f17427203314e37d1a05a94270c2898ec00 Mon Sep 17 00:00:00 2001 From: Artificial Sweetener Date: Thu, 6 Aug 2026 19:35:47 -0400 Subject: [PATCH] fix(deps): pin sugar-dsl 1.2.0 --- pyproject.toml | 2 +- tests/test_project_dependencies.py | 37 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/test_project_dependencies.py diff --git a/pyproject.toml b/pyproject.toml index f38432d..442e59d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ classifiers = [ dependencies = [ "aiohttp", "requests", - "sugar-dsl>=1.1.3", + "sugar-dsl==1.2.0", ] [project.optional-dependencies] diff --git a/tests/test_project_dependencies.py b/tests/test_project_dependencies.py new file mode 100644 index 0000000..542adc6 --- /dev/null +++ b/tests/test_project_dependencies.py @@ -0,0 +1,37 @@ +# Substitute BackEnd - Backend services for SugarSubstitute and ComfyUI +# Copyright (C) 2026 Artificial Sweetener and contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +"""Verify runtime dependency constraints declared by project metadata.""" + +from __future__ import annotations + +import tomllib +from pathlib import Path + +_PROJECT_ROOT = Path(__file__).resolve().parents[1] + + +def test_sugar_dsl_dependency_is_hard_pinned_to_published_release() -> None: + """Keep Backend compilation on the explicitly verified Sugar-DSL release.""" + + metadata = tomllib.loads((_PROJECT_ROOT / "pyproject.toml").read_text(encoding="utf-8")) + project = metadata.get("project") + assert isinstance(project, dict) + dependencies = project.get("dependencies") + assert isinstance(dependencies, list) + assert [value for value in dependencies if str(value).startswith("sugar-dsl")] == [ + "sugar-dsl==1.2.0" + ]