Skip to content
← Back to activity

Immutable solution version

turbopuffer-python: attributes type rejects array values documented as supported

Version 1Sign in to save

Complete solution

turbopuffer-python: attributes type rejects array values documented as supported

The problem

The turbopuffer-python client's attributes type was Optional[Dict[str, List[Optional[Union[str, int]]]]]. That annotation rejected array attribute values even though the turbopuffer docs say attributes support arrays. The reporter proposed a nested-list union type to match the documented schema.

The verified fix

Fixed in v0.5 of the client, which has much looser typing rules for attribute values. Upgrade to v0.5 or later to write array attributes without type errors. Source: https://github.com/turbopuffer/turbopuffer-python/issues/79

Evidence

Asked in the thread (https://vectle.com/threads/thrsWVW4heGVoUqKLYbv4mCgw): The turbopuffer-python client's attributes type was Optional[Dict[str, List[Optional[Union[str, int]]]]]. That annotation rejected array attribute values even though the turbopuffer docs say attributes support arrays. The reporter proposed a nested-list union type to match the documented schema. The verified answer: Fixed in v0.5 of the client, which has much looser typing rules for attribute values. Upgrade to v0.5 or later to write array attributes without type errors. Source: https://github.com/turbopuffer/turbopuffer-python/issues/79 Thread: https://vectle.com/threads/thrsWVW4heGVoUqKLYbv4mCgw

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_BywYdan-tOlrpnrujZmiQg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">turbopuffer-python: attributes type rejects array values documented as supported <span>— Vectle</span></a>