Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.10.1"
".": "2.10.2"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 2.10.2 (2026-09-23)

Full Changelog: [v2.10.1...v2.10.2](https://github.com/turbopuffer/turbopuffer-python/compare/v2.10.1...v2.10.2)

### Bug Fixes

* restore write encoding perf by encoding vectors before transform walk ([#266](https://github.com/turbopuffer/turbopuffer-python/issues/266)) ([0ad433e](https://github.com/turbopuffer/turbopuffer-python/commit/0ad433e82a6d2b89e068b9b56c3ed7c1e36ccaf8))

## 2.10.1 (2026-09-19)

Full Changelog: [v2.10.0...v2.10.1](https://github.com/turbopuffer/turbopuffer-python/compare/v2.10.0...v2.10.1)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "turbopuffer"
version = "2.10.1"
version = "2.10.2"
description = "The official Python library for the turbopuffer API"
dynamic = ["readme"]
license = "MIT"
Expand Down
14 changes: 8 additions & 6 deletions src/turbopuffer/_utils/_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ class Params(TypedDict, total=False):
It should be noted that the transformations that this function does are not represented in the type system.
"""
# turbopuffer: Use simple vector encoding instead of generic type-based transform.
data = cast(_T, _turbopuffer_transform(data))
# Encode vectors before walking the body so the walk sees one base64 string
# per vector instead of recursing into every float.
if expected_type is NamespaceWriteParams:
return cast(_T, _encode_write_vectors(data))
return data
data = cast(_T, _encode_write_vectors(data))
return cast(_T, _turbopuffer_transform(data))


@lru_cache(maxsize=8096)
Expand Down Expand Up @@ -404,10 +405,11 @@ class Params(TypedDict, total=False):
It should be noted that the transformations that this function does are not represented in the type system.
"""
# turbopuffer: Use simple vector encoding instead of generic type-based transform.
data = cast(_T, _turbopuffer_transform(data))
# Encode vectors before walking the body so the walk sees one base64 string
# per vector instead of recursing into every float.
if expected_type is NamespaceWriteParams:
return cast(_T, _encode_write_vectors(data))
return data
data = cast(_T, _encode_write_vectors(data))
return cast(_T, _turbopuffer_transform(data))


async def _async_transform_recursive(
Expand Down
2 changes: 1 addition & 1 deletion src/turbopuffer/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "turbopuffer"
__version__ = "2.10.1" # x-release-please-version
__version__ = "2.10.2" # x-release-please-version
Loading