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
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Minor cursor behaviour changes:
- has_next may set the cursor to CLOSED if no next items are detected.
Added support for overriding reranking options in find_and_rerank method call.
Added support for custom CA certificates (PEM) in the APIOptions (new `ca_cert_path` parameter)
Admin, removed the deprecated 'region_name' alias for `name` from `AstraDBAdminDatabaseRegionInfo` and `AstraDBAvailableRegionInfo`
Bugfix: faulty normalization of empty/null indexing targets for `CollectionDefinition.set_indexing`
maintenance: integration testing gets an embedding provider switcher logic
maintenance: integration tests use the latest HCD (2.0.6) and a recent Data API build (1.0.46)
Expand Down
13 changes: 13 additions & 0 deletions astrapy/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ class StaticTokenProvider(TokenProvider):
... )
"""

token: str | None

def __init__(self, token: str | None) -> None:
self.token = token

Expand Down Expand Up @@ -228,6 +230,10 @@ class UsernamePasswordTokenProvider(TokenProvider):

PREFIX = "Cassandra"

username: str
password: str
token: str

def __init__(self, username: str, password: str) -> None:
self.username = username
self.password = password
Expand Down Expand Up @@ -339,6 +345,8 @@ class EmbeddingAPIKeyHeaderProvider(EmbeddingHeadersProvider):
... )
"""

embedding_api_key: str | None

def __init__(self, embedding_api_key: str | None) -> None:
self.embedding_api_key = embedding_api_key

Expand Down Expand Up @@ -405,6 +413,9 @@ class AWSEmbeddingHeadersProvider(EmbeddingHeadersProvider):
... )
"""

embedding_access_id: str
embedding_secret_id: str

def __init__(self, *, embedding_access_id: str, embedding_secret_id: str) -> None:
self.embedding_access_id = embedding_access_id
self.embedding_secret_id = embedding_secret_id
Expand Down Expand Up @@ -477,6 +488,8 @@ class RerankingAPIKeyHeaderProvider(RerankingHeadersProvider):
... )
"""

reranking_api_key: str | None

def __init__(self, reranking_api_key: str | None) -> None:
self.reranking_api_key = reranking_api_key

Expand Down
19 changes: 0 additions & 19 deletions astrapy/data/info/database_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
DEFAULT_CREATE_DB_DB_TYPE,
DEFAULT_CREATE_DB_TIER,
)
from astrapy.utils.meta import deprecated_property
from astrapy.utils.parsing import _warn_residual_keys


Expand Down Expand Up @@ -88,15 +87,6 @@ def __repr__(self) -> str:
]
return f"{self.__class__.__name__}({', '.join(pieces)})"

@property
@deprecated_property(
new_name="name",
deprecated_in="2.0.1",
removed_in="2.3.0",
)
def region_name(self) -> str:
return self.name


@dataclass
class _BaseAstraDBDatabaseInfo:
Expand Down Expand Up @@ -379,15 +369,6 @@ def as_dict(self) -> dict[str, Any]:
if v is not None
}

@property
@deprecated_property(
new_name="name",
deprecated_in="2.0.1",
removed_in="2.3.0",
)
def region_name(self) -> str:
return self.name

@classmethod
def _from_dict(cls, raw_dict: dict[str, Any]) -> AstraDBAvailableRegionInfo:
"""
Expand Down
90 changes: 0 additions & 90 deletions tests/base/unit/test_regionname_deprecation.py

This file was deleted.

Loading