diff --git a/pinecone/data/features/bulk_import.py b/pinecone/data/features/bulk_import.py index 1b5d91c3..ab962998 100644 --- a/pinecone/data/features/bulk_import.py +++ b/pinecone/data/features/bulk_import.py @@ -1,8 +1,5 @@ -import warnings - from enum import Enum -from functools import wraps -from typing import Optional, Union, Literal, Iterator, List +from typing import Optional, Literal, Iterator, List from pinecone.utils.decorators import prerelease_feature from pinecone.config.config import ConfigBuilder diff --git a/pinecone/utils/decorators.py b/pinecone/utils/decorators.py index 290c6905..299f8d42 100644 --- a/pinecone/utils/decorators.py +++ b/pinecone/utils/decorators.py @@ -2,11 +2,14 @@ from functools import wraps from typing import Optional, Callable + class PineconePrereleaseWarning(UserWarning): pass + warnings.simplefilter("once", PineconePrereleaseWarning) + def prerelease_feature( message: str = "This is a pre-release feature and may change in the future.", api_version: Optional[str] = None ):