From 92e9f0c36fc6217180b317c236a97f8582707393 Mon Sep 17 00:00:00 2001 From: kamilbenkirane Date: Sun, 16 Nov 2025 15:21:08 +0100 Subject: [PATCH 1/3] chore: bump version to 0.2.6 and update package versions to 0.2.2 --- packages/image-generation/pyproject.toml | 2 +- packages/text-generation/pyproject.toml | 2 +- pyproject.toml | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/image-generation/pyproject.toml b/packages/image-generation/pyproject.toml index b941fcbe..f146397a 100644 --- a/packages/image-generation/pyproject.toml +++ b/packages/image-generation/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "celeste-image-generation" -version = "0.2.1" +version = "0.2.2" description = "Type-safe image generation for Celeste AI. Unified interface for OpenAI, Google, ByteDance, and more" authors = [{name = "Kamilbenkirane", email = "kamil@withceleste.ai"}] readme = "README.md" diff --git a/packages/text-generation/pyproject.toml b/packages/text-generation/pyproject.toml index 873fbf42..335dda8a 100644 --- a/packages/text-generation/pyproject.toml +++ b/packages/text-generation/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "celeste-text-generation" -version = "0.2.1" +version = "0.2.2" description = "Type-safe text generation for Celeste AI. Unified interface for OpenAI, Anthropic, Google, Mistral, Cohere, and more" authors = [{name = "Kamilbenkirane", email = "kamil@withceleste.ai"}] readme = "README.md" diff --git a/pyproject.toml b/pyproject.toml index 080a4a4f..0d4fd7ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "celeste-ai" -version = "0.2.5" +version = "0.2.6" description = "Open source, type-safe primitives for multi-modal AI. All capabilities, all providers, one interface" authors = [{name = "Kamilbenkirane", email = "kamil@withceleste.ai"}] readme = "README.md" @@ -33,13 +33,13 @@ Repository = "https://github.com/withceleste/celeste-python" Issues = "https://github.com/withceleste/celeste-python/issues" [project.optional-dependencies] -text-generation = ["celeste-text-generation>=0.2.1"] -image-generation = ["celeste-image-generation>=0.2.1"] +text-generation = ["celeste-text-generation>=0.2.2"] +image-generation = ["celeste-image-generation>=0.2.2"] image-intelligence = ["celeste-image-intelligence>=0.2.1"] speech-generation = ["celeste-speech-generation>=0.2.3"] all = [ - "celeste-text-generation>=0.2.1", - "celeste-image-generation>=0.2.1", + "celeste-text-generation>=0.2.2", + "celeste-image-generation>=0.2.2", "celeste-image-intelligence>=0.2.1", "celeste-speech-generation>=0.2.3", ] From 4c654e7a62da4f6e81bc6f7b2e30da47e4012819 Mon Sep 17 00:00:00 2001 From: kamilbenkirane Date: Sun, 16 Nov 2025 15:30:25 +0100 Subject: [PATCH 2/3] fix: add HTTP client cleanup fixture for pytest-xdist event loop --- .../tests/integration_tests/conftest.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 packages/text-generation/tests/integration_tests/conftest.py diff --git a/packages/text-generation/tests/integration_tests/conftest.py b/packages/text-generation/tests/integration_tests/conftest.py new file mode 100644 index 00000000..2d7b61e4 --- /dev/null +++ b/packages/text-generation/tests/integration_tests/conftest.py @@ -0,0 +1,18 @@ +"""Pytest configuration and fixtures for integration tests.""" + +import pytest +import pytest_asyncio + +from celeste.http import close_all_http_clients + + +@pytest_asyncio.fixture(autouse=True) +async def cleanup_http_clients() -> None: + """Ensure HTTP clients are closed after each test. + + This fixture runs automatically after each test to ensure HTTP clients + are properly closed before pytest-asyncio closes the event loop. + This prevents "Event loop is closed" errors when using pytest-xdist. + """ + yield + await close_all_http_clients() From 7cb8dac0c1ea32042b238ad9ccfa1bb697ab52f6 Mon Sep 17 00:00:00 2001 From: kamilbenkirane Date: Sun, 16 Nov 2025 15:31:21 +0100 Subject: [PATCH 3/3] fix: correct type annotation for async fixture --- packages/text-generation/tests/integration_tests/conftest.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/text-generation/tests/integration_tests/conftest.py b/packages/text-generation/tests/integration_tests/conftest.py index 2d7b61e4..d06d892f 100644 --- a/packages/text-generation/tests/integration_tests/conftest.py +++ b/packages/text-generation/tests/integration_tests/conftest.py @@ -1,13 +1,14 @@ """Pytest configuration and fixtures for integration tests.""" -import pytest +from collections.abc import AsyncGenerator + import pytest_asyncio from celeste.http import close_all_http_clients @pytest_asyncio.fixture(autouse=True) -async def cleanup_http_clients() -> None: +async def cleanup_http_clients() -> AsyncGenerator[None, None]: """Ensure HTTP clients are closed after each test. This fixture runs automatically after each test to ensure HTTP clients