From 7ec3cb063d4459fcdfa8271686cffa6945b45b62 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 7 Jul 2025 12:23:25 -0300 Subject: [PATCH] chore(deps): update pyleak version and activate pyleak_marker in tests (#8905) * chore: update pyleak dependency to version 0.1.14 in pyproject.toml and uv.lock * fix(tests): enable pyleak marker in test files to address memory leak issues --- pyproject.toml | 2 +- .../integration/components/helpers/test_parse_json_data.py | 6 ++---- src/backend/tests/integration/flows/test_basic_prompting.py | 6 ++---- uv.lock | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7fa160e67..235698955 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -175,7 +175,7 @@ dev = [ "faker>=37.0.0", "pytest-timeout>=2.3.1", "pyyaml>=6.0.2", - "pyleak>=0.1.12", + "pyleak>=0.1.14", ] [tool.uv.sources] diff --git a/src/backend/tests/integration/components/helpers/test_parse_json_data.py b/src/backend/tests/integration/components/helpers/test_parse_json_data.py index e6e64af4d..2671c4a53 100644 --- a/src/backend/tests/integration/components/helpers/test_parse_json_data.py +++ b/src/backend/tests/integration/components/helpers/test_parse_json_data.py @@ -3,11 +3,9 @@ from langflow.components.processing.parse_json_data import ParseJSONDataComponen from langflow.schema import Data from tests.integration.components.mock_components import TextToData -from tests.integration.utils import ComponentInputHandle, run_single_component +from tests.integration.utils import ComponentInputHandle, pyleak_marker, run_single_component -# TODO: Fix pyleak issue -# https://github.com/langflow-ai/langflow/actions/runs/16013103799/job/45208685212 -# pytestmark = pyleak_marker() +pytestmark = pyleak_marker() async def test_from_data(): diff --git a/src/backend/tests/integration/flows/test_basic_prompting.py b/src/backend/tests/integration/flows/test_basic_prompting.py index 3deb5a6a2..cc225225c 100644 --- a/src/backend/tests/integration/flows/test_basic_prompting.py +++ b/src/backend/tests/integration/flows/test_basic_prompting.py @@ -3,12 +3,10 @@ from langflow.components.processing import PromptComponent from langflow.graph import Graph from langflow.schema.message import Message -from tests.integration.utils import run_flow +from tests.integration.utils import pyleak_marker, run_flow -# TODO: Fix pyleak issue -# https://github.com/langflow-ai/langflow/actions/runs/16013103799/job/45208685212 -# @pyleak_marker() +@pyleak_marker() async def test_simple_no_llm(): graph = Graph() flow_input = graph.add_component(ChatInput()) diff --git a/uv.lock b/uv.lock index 2a434ee41..348420691 100644 --- a/uv.lock +++ b/uv.lock @@ -5157,7 +5157,7 @@ dev = [ { name = "pandas-stubs", specifier = ">=2.1.4.231227" }, { name = "pre-commit", specifier = ">=3.7.0" }, { name = "pydantic-ai", specifier = ">=0.0.19" }, - { name = "pyleak", specifier = ">=0.1.12" }, + { name = "pyleak", specifier = ">=0.1.14" }, { name = "pytest", specifier = ">=8.2.0" }, { name = "pytest-asyncio", specifier = ">=0.23.0" }, { name = "pytest-cov", specifier = ">=5.0.0" },