From 2088d8564c13541a52887bb872194527dfc2eede Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Sep 2025 07:05:51 +0000 Subject: [PATCH 1/3] docs: hint_cache_warm also update header and openapi --- .stats.yml | 4 ++-- src/turbopuffer/resources/namespaces.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index ee8062c..5d4b3da 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 11 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/turbopuffer-benesch%2Fturbopuffer-bacff0c1b1374c574a35bceee4a27f9b16648c7a6da3b410c5084d44664b1a4b.yml -openapi_spec_hash: e9db6f14662071b7b3d6d3bd8d52f0e6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/turbopuffer-benesch%2Fturbopuffer-084d94dbb718303af02810ff961f903d03a2129c0f6bb68eab711fd20aa65d5e.yml +openapi_spec_hash: d8b99fe47976d40a2cc31b3b7177f9bd config_hash: a31fec3e293600dd17e128d578ed68cd diff --git a/src/turbopuffer/resources/namespaces.py b/src/turbopuffer/resources/namespaces.py index 70137a4..e686990 100644 --- a/src/turbopuffer/resources/namespaces.py +++ b/src/turbopuffer/resources/namespaces.py @@ -202,7 +202,7 @@ def hint_cache_warm( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> NamespaceHintCacheWarmResponse: """ - Warm the cache for a namespace. + Signal turbopuffer to prepare for low-latency requests. Args: extra_headers: Send extra headers @@ -782,7 +782,7 @@ async def hint_cache_warm( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> NamespaceHintCacheWarmResponse: """ - Warm the cache for a namespace. + Signal turbopuffer to prepare for low-latency requests. Args: extra_headers: Send extra headers From 2531e22701bd5581220a5ad7193b6d8877d91e52 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:07:22 +0000 Subject: [PATCH 2/3] codegen metadata --- .stats.yml | 4 ++-- scripts/gen | 2 +- src/turbopuffer/types/custom.py | 4 ++-- tests/custom/test_bm25.py | 20 +++++++++----------- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5d4b3da..e23de06 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 11 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/turbopuffer-benesch%2Fturbopuffer-084d94dbb718303af02810ff961f903d03a2129c0f6bb68eab711fd20aa65d5e.yml -openapi_spec_hash: d8b99fe47976d40a2cc31b3b7177f9bd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/turbopuffer-benesch%2Fturbopuffer-3427ced847d677ce0e14695a611429e61f23e537a69f9dd0a99b6f5cfd44b20b.yml +openapi_spec_hash: 02894103ee3f46df8ae1ad8dd36dee24 config_hash: a31fec3e293600dd17e128d578ed68cd diff --git a/scripts/gen b/scripts/gen index 2bb6778..de6629b 100755 --- a/scripts/gen +++ b/scripts/gen @@ -4,7 +4,7 @@ set -e cd "$(dirname "$0")/.." -apigen_image=ghcr.io/turbopuffer/turbopuffer-apigen:e932946cf468628299aa55c51a8e69f9cffc1d8e +apigen_image=ghcr.io/turbopuffer/turbopuffer-apigen:845afe6694c1f6c76af2abd586ca8747859ea5a5 apigen() { if [[ "$TURBOPUFFER_DEV_APIGEN" ]]; then diff --git a/src/turbopuffer/types/custom.py b/src/turbopuffer/types/custom.py index 7881bac..d5a0c0a 100644 --- a/src/turbopuffer/types/custom.py +++ b/src/turbopuffer/types/custom.py @@ -46,8 +46,8 @@ Tuple[str, Literal["BM25"], Sequence[str], Bm25ClauseParams], Tuple[Literal["Sum"], Sequence["RankByText"]], Tuple[Literal["Max"], Sequence["RankByText"]], - Tuple[Literal["Product"], Tuple[float, "RankByText"]], - Tuple[Literal["Product"], Tuple["RankByText", float]], + Tuple[Literal["Product"], float, "RankByText"], + Tuple[Literal["Product"], "RankByText", float], ] RankByAttributeOrder = Union[Literal["asc"], Literal["desc"]] RankByAttribute = Tuple[str, RankByAttributeOrder] diff --git a/tests/custom/test_bm25.py b/tests/custom/test_bm25.py index 893a4e9..c9829c1 100644 --- a/tests/custom/test_bm25.py +++ b/tests/custom/test_bm25.py @@ -135,26 +135,24 @@ def test_bm25_product_operator(tpuf: Turbopuffer): # Try out a bunch of query variations queries: list[RankBy] = [ - ("Product", (0.5, ("title", "BM25", "quick brown"))), - ("Product", (("title", "BM25", "quick brown"), 0.5)), + ("Product", 0.5, ("title", "BM25", "quick brown")), + ("Product", ("title", "BM25", "quick brown"), 0.5), ( "Sum", [ - ("Product", (0.5, ("title", "BM25", "quick brown"))), + ("Product", 0.5, ("title", "BM25", "quick brown")), ("content", "BM25", "brown"), ], ), ( "Product", + 0.5, ( - 0.5, - ( - "Sum", - [ - ("Product", (0.5, ("title", "BM25", "quick brown"))), - ("content", "BM25", "brown"), - ], - ), + "Sum", + [ + ("Product", 0.5, ("title", "BM25", "quick brown")), + ("content", "BM25", "brown"), + ], ), ), ] From fbb37551be254b4ebec6a98a175bfee1fa4f7fc4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:07:44 +0000 Subject: [PATCH 3/3] release: 1.3.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/turbopuffer/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2a8f4ff..0e5b256 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.3.0" + ".": "1.3.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 97196c2..fc3f615 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.3.1 (2025-10-06) + +Full Changelog: [v1.3.0...v1.3.1](https://github.com/turbopuffer/turbopuffer-python/compare/v1.3.0...v1.3.1) + +### Documentation + +* hint_cache_warm also update header and openapi ([2088d85](https://github.com/turbopuffer/turbopuffer-python/commit/2088d8564c13541a52887bb872194527dfc2eede)) + ## 1.3.0 (2025-09-24) Full Changelog: [v1.2.0...v1.3.0](https://github.com/turbopuffer/turbopuffer-python/compare/v1.2.0...v1.3.0) diff --git a/pyproject.toml b/pyproject.toml index 62f2b17..8c2f2b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "turbopuffer" -version = "1.3.0" +version = "1.3.1" description = "The official Python library for the turbopuffer API" dynamic = ["readme"] license = "MIT" diff --git a/src/turbopuffer/_version.py b/src/turbopuffer/_version.py index 385a145..a2050e8 100644 --- a/src/turbopuffer/_version.py +++ b/src/turbopuffer/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "turbopuffer" -__version__ = "1.3.0" # x-release-please-version +__version__ = "1.3.1" # x-release-please-version