Skip to content

Commit fcdc789

Browse files
akxbenesch
authored andcommitted
chore: remove compatibility shims
1 parent 3d5b143 commit fcdc789

File tree

2 files changed

+1
-47
lines changed

2 files changed

+1
-47
lines changed

src/turbopuffer/__init__.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import typing as _t
4-
from typing_extensions import deprecated
54

65
from . import types
76
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given
@@ -101,34 +100,3 @@
101100
except (TypeError, AttributeError):
102101
# Some of our exported symbols are builtins which we can't set attributes for.
103102
pass
104-
105-
106-
# TODO(benesch): remove these shims when sufficient time has passed (say, Sep 2025).
107-
class Namespace:
108-
@deprecated(
109-
"use turbopuffer.Turbopuffer().namespace() instead; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help"
110-
)
111-
def __init__(self, *args: _t.Any, **kwargs: _t.Any):
112-
raise NotImplementedError(
113-
"the turbopuffer.Namespace class has been removed; use turbopuffer.Turbopuffer().namespace() instead; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help"
114-
)
115-
116-
117-
class VectorRow:
118-
@deprecated(
119-
"use turbopuffer.Row() instead; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help"
120-
)
121-
def __init__(self, *args: _t.Any, **kwargs: _t.Any):
122-
raise NotImplementedError(
123-
"the turbopuffer.VectorRow() class has been removed; use turbopuffer.Row() instead; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help"
124-
)
125-
126-
127-
class VectorColumns:
128-
@deprecated(
129-
"use turbopuffer.Columns() instead; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help"
130-
)
131-
def __init__(self, *args: _t.Any, **kwargs: _t.Any):
132-
raise NotImplementedError(
133-
"the turbopuffer.VectorColumns() class has been removed; use turbopuffer.Columns() instead; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help"
134-
)

src/turbopuffer/lib/namespace.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import annotations
22

33
from typing import TYPE_CHECKING, Protocol
4-
from typing_extensions import override, deprecated
4+
from typing_extensions import override
55

66
from ..resources import namespaces
77

@@ -29,20 +29,6 @@ class Namespace(namespaces.NamespacesResource, NamespaceMixin):
2929
def __init__(self, client: Turbopuffer) -> None:
3030
super().__init__(client)
3131

32-
# TODO(benesch): remove these shims when sufficient time has passed (say, Sep 2025).
33-
34-
@deprecated("method removed; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help")
35-
def dimensions(self) -> None:
36-
raise NotImplementedError(
37-
"the Namespace.dimensions() method has been removed; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help"
38-
)
39-
40-
@deprecated("method removed; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help")
41-
def approx_count(self) -> None:
42-
raise NotImplementedError(
43-
"the Namespace.approx_count() method has been removed; see https://github.com/turbopuffer/turbopuffer-python/blob/main/UPGRADING.md for help"
44-
)
45-
4632

4733
class NamespaceWithRawResponse(namespaces.NamespacesResourceWithRawResponse, NamespaceMixin):
4834
def __init__(self, client: Turbopuffer) -> None:

0 commit comments

Comments
 (0)