From 4ddbb84d5ffdb4ab4cc462a678379c96674781bd Mon Sep 17 00:00:00 2001 From: Anatolii Yatsuk Date: Wed, 4 Dec 2024 13:37:44 +0200 Subject: [PATCH] Delete unused DeclarativePartitionFactory --- .../declarative_partition_generator.py | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/airbyte_cdk/sources/declarative/stream_slicers/declarative_partition_generator.py b/airbyte_cdk/sources/declarative/stream_slicers/declarative_partition_generator.py index c7e60ba4d..09ed2bc80 100644 --- a/airbyte_cdk/sources/declarative/stream_slicers/declarative_partition_generator.py +++ b/airbyte_cdk/sources/declarative/stream_slicers/declarative_partition_generator.py @@ -38,33 +38,6 @@ def create(self, stream_slice: StreamSlice) -> Partition: stream_slice, ) -class DeclarativePartitionFactory1: - def __init__( - self, - stream_name: str, - json_schema: Mapping[str, Any], - retriever: Retriever, - message_repository: MessageRepository, - ) -> None: - """ - The DeclarativePartitionFactory takes a retriever_factory and not a retriever directly. The reason is that our components are not - thread safe and classes like `DefaultPaginator` may not work because multiple threads can access and modify a shared field across each other. - In order to avoid these problems, we will create one retriever per thread which should make the processing thread-safe. - """ - self._stream_name = stream_name - self._json_schema = json_schema - self._retriever = retriever - self._message_repository = message_repository - - def create(self, stream_slice: StreamSlice) -> Partition: - return DeclarativePartition( - self._stream_name, - self._json_schema, - self._retriever, - self._message_repository, - stream_slice, - ) - class DeclarativePartition(Partition): def __init__( self,