diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6538ca91..2b28d6ec 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.8.0" + ".": "0.8.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8425ba68..fe78a957 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.8.1 (2025-06-18) + +Full Changelog: [v0.8.0...v0.8.1](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.8.0...v0.8.1) + +### Bug Fixes + +* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([d3a40a0](https://github.com/mixedbread-ai/mixedbread-python/commit/d3a40a0f8b7006884b530e6e2a01a8993192738b)) + + +### Chores + +* **readme:** update badges ([5560ca6](https://github.com/mixedbread-ai/mixedbread-python/commit/5560ca69463e25e9e9aa22af3c0b2f6bd6fefb74)) + ## 0.8.0 (2025-06-17) Full Changelog: [v0.7.1...v0.8.0](https://github.com/mixedbread-ai/mixedbread-python/compare/v0.7.1...v0.8.0) diff --git a/README.md b/README.md index 24d13985..9481c5b1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Mixedbread API Python SDK API library -[![PyPI version](https://img.shields.io/pypi/v/mixedbread.svg)](https://pypi.org/project/mixedbread/) +[![PyPI version]()](https://pypi.org/project/mixedbread/) The Mixedbread API Python SDK library provides convenient access to the Mixedbread REST API from any Python 3.8+ application. The library includes type definitions for all request params and response fields, diff --git a/pyproject.toml b/pyproject.toml index 3c8e4489..0bdfeffa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "mixedbread" -version = "0.8.0" +version = "0.8.1" description = "The official Python library for the Mixedbread API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/mixedbread/_version.py b/src/mixedbread/_version.py index dd1d30f9..cebff629 100644 --- a/src/mixedbread/_version.py +++ b/src/mixedbread/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "mixedbread" -__version__ = "0.8.0" # x-release-please-version +__version__ = "0.8.1" # x-release-please-version diff --git a/tests/test_client.py b/tests/test_client.py index 14fe9a45..7c75ca18 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -23,9 +23,7 @@ from mixedbread import Mixedbread, AsyncMixedbread, APIResponseValidationError from mixedbread._types import Omit -from mixedbread._utils import maybe_transform from mixedbread._models import BaseModel, FinalRequestOptions -from mixedbread._constants import RAW_RESPONSE_HEADER from mixedbread._exceptions import APIStatusError, APITimeoutError, MixedbreadError, APIResponseValidationError from mixedbread._base_client import ( DEFAULT_TIMEOUT, @@ -35,7 +33,6 @@ DefaultAsyncHttpxClient, make_request_options, ) -from mixedbread.types.vector_store_create_params import VectorStoreCreateParams from .utils import update_env @@ -733,32 +730,21 @@ def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str @mock.patch("mixedbread._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, client: Mixedbread) -> None: respx_mock.post("/v1/vector_stores").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - self.client.post( - "/v1/vector_stores", - body=cast(object, maybe_transform({}, VectorStoreCreateParams)), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + client.vector_stores.with_streaming_response.create().__enter__() assert _get_open_connections(self.client) == 0 @mock.patch("mixedbread._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client: Mixedbread) -> None: respx_mock.post("/v1/vector_stores").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - self.client.post( - "/v1/vector_stores", - body=cast(object, maybe_transform({}, VectorStoreCreateParams)), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + client.vector_stores.with_streaming_response.create().__enter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @@ -1568,32 +1554,25 @@ async def test_parse_retry_after_header(self, remaining_retries: int, retry_afte @mock.patch("mixedbread._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_timeout_errors_doesnt_leak( + self, respx_mock: MockRouter, async_client: AsyncMixedbread + ) -> None: respx_mock.post("/v1/vector_stores").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - await self.client.post( - "/v1/vector_stores", - body=cast(object, maybe_transform({}, VectorStoreCreateParams)), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) + await async_client.vector_stores.with_streaming_response.create().__aenter__() assert _get_open_connections(self.client) == 0 @mock.patch("mixedbread._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: + async def test_retrying_status_errors_doesnt_leak( + self, respx_mock: MockRouter, async_client: AsyncMixedbread + ) -> None: respx_mock.post("/v1/vector_stores").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - await self.client.post( - "/v1/vector_stores", - body=cast(object, maybe_transform({}, VectorStoreCreateParams)), - cast_to=httpx.Response, - options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, - ) - + await async_client.vector_stores.with_streaming_response.create().__aenter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4])