2323    ConfiguredAirbyteCatalog ,
2424    TraceType ,
2525)
26- from  airbyte_cdk .sources .declarative .declarative_source  import  DeclarativeSource 
26+ from  airbyte_cdk .sources .declarative .concurrent_declarative_source  import  (
27+     ConcurrentDeclarativeSource ,
28+ )
2729from  airbyte_cdk .utils  import  AirbyteTracedException 
2830from  airbyte_cdk .utils .datetime_format_inferrer  import  DatetimeFormatInferrer 
2931from  airbyte_cdk .utils .schema_inferrer  import  (
@@ -55,7 +57,7 @@ class TestReader:
5557            that contains slices of data, log messages, auxiliary requests, and any inferred schema or datetime formats. 
5658
5759            Parameters: 
58-                 source (DeclarativeSource ): The data source to read from. 
60+                 source (ConcurrentDeclarativeSource ): The data source to read from. 
5961                config (Mapping[str, Any]): Configuration parameters for the source. 
6062                configured_catalog (ConfiguredAirbyteCatalog): Catalog containing stream configuration. 
6163                state (List[AirbyteStateMessage]): Current state information for the read. 
@@ -83,7 +85,7 @@ def __init__(
8385
8486    def  run_test_read (
8587        self ,
86-         source : DeclarativeSource ,
88+         source : ConcurrentDeclarativeSource [ Optional [ List [ AirbyteStateMessage ]]] ,
8789        config : Mapping [str , Any ],
8890        configured_catalog : ConfiguredAirbyteCatalog ,
8991        stream_name : str ,
@@ -94,7 +96,7 @@ def run_test_read(
9496        Run a test read for the connector by reading from a single stream and inferring schema and datetime formats. 
9597
9698        Parameters: 
97-             source (DeclarativeSource ): The source instance providing the streams. 
99+             source (ConcurrentDeclarativeSource ): The source instance providing the streams. 
98100            config (Mapping[str, Any]): The configuration settings to use for reading. 
99101            configured_catalog (ConfiguredAirbyteCatalog): The catalog specifying the stream configuration. 
100102            state (List[AirbyteStateMessage]): A list of state messages to resume the read. 
@@ -126,7 +128,7 @@ def run_test_read(
126128            if  stream 
127129            else  None ,
128130            self ._cursor_field_to_nested_and_composite_field (stream .cursor_field )
129-             if  stream 
131+             if  stream   and   stream . cursor_field 
130132            else  None ,
131133        )
132134        datetime_format_inferrer  =  DatetimeFormatInferrer ()
@@ -381,13 +383,13 @@ def _get_latest_config_update(
381383
382384    def  _read_stream (
383385        self ,
384-         source : DeclarativeSource ,
386+         source : ConcurrentDeclarativeSource [ Optional [ List [ AirbyteStateMessage ]]] ,
385387        config : Mapping [str , Any ],
386388        configured_catalog : ConfiguredAirbyteCatalog ,
387389        state : List [AirbyteStateMessage ],
388390    ) ->  Iterator [AirbyteMessage ]:
389391        """ 
390-         Reads messages from the given DeclarativeSource  using an AirbyteEntrypoint. 
392+         Reads messages from the given ConcurrentDeclarativeSource  using an AirbyteEntrypoint. 
391393
392394        This method attempts to yield messages from the source's read generator. If the generator 
393395        raises an AirbyteTracedException, it checks whether the exception message indicates a non-actionable 
@@ -396,7 +398,7 @@ def _read_stream(
396398        wrapped into an AirbyteTracedException, and yielded as an AirbyteMessage. 
397399
398400        Parameters: 
399-             source (DeclarativeSource ): The source object that provides data reading logic. 
401+             source (ConcurrentDeclarativeSource ): The source object that provides data reading logic. 
400402            config (Mapping[str, Any]): The configuration dictionary for the source. 
401403            configured_catalog (ConfiguredAirbyteCatalog): The catalog defining the streams and their configurations. 
402404            state (List[AirbyteStateMessage]): A list representing the current state for incremental sync. 
0 commit comments