airbyte-cdk 6.62.0.dev0__py3-none-any.whl → 6.62.0.dev2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -752,7 +752,7 @@ class ModelToComponentFactory:
752
752
  OAuthAuthenticatorModel: self.create_oauth_authenticator,
753
753
  OffsetIncrementModel: self.create_offset_increment,
754
754
  PageIncrementModel: self.create_page_increment,
755
- ParentStreamConfigModel: self.create_parent_stream_config,
755
+ ParentStreamConfigModel: self._create_message_repository_substream_wrapper,
756
756
  PredicateValidatorModel: self.create_predicate_validator,
757
757
  PropertiesFromEndpointModel: self.create_properties_from_endpoint,
758
758
  PropertyChunkingModel: self.create_property_chunking,
@@ -1748,7 +1748,7 @@ class ModelToComponentFactory:
1748
1748
 
1749
1749
  if self._is_component(model_value):
1750
1750
  model_args[model_field] = self._create_nested_component(
1751
- model, model_field, model_value, config
1751
+ model, model_field, model_value, config, **kwargs,
1752
1752
  )
1753
1753
  elif isinstance(model_value, list):
1754
1754
  vals = []
@@ -1760,7 +1760,7 @@ class ModelToComponentFactory:
1760
1760
  if derived_type:
1761
1761
  v["type"] = derived_type
1762
1762
  if self._is_component(v):
1763
- vals.append(self._create_nested_component(model, model_field, v, config))
1763
+ vals.append(self._create_nested_component(model, model_field, v, config, **kwargs,))
1764
1764
  else:
1765
1765
  vals.append(v)
1766
1766
  model_args[model_field] = vals
@@ -1850,7 +1850,7 @@ class ModelToComponentFactory:
1850
1850
  return []
1851
1851
 
1852
1852
  def _create_nested_component(
1853
- self, model: Any, model_field: str, model_value: Any, config: Config
1853
+ self, model: Any, model_field: str, model_value: Any, config: Config, **kwargs: Any
1854
1854
  ) -> Any:
1855
1855
  type_name = model_value.get("type", None)
1856
1856
  if not type_name:
@@ -1875,8 +1875,11 @@ class ModelToComponentFactory:
1875
1875
  for kwarg in constructor_kwargs
1876
1876
  if kwarg in model_parameters
1877
1877
  }
1878
+ matching_kwargs = {
1879
+ kwarg: kwargs[kwarg] for kwarg in constructor_kwargs if kwarg in kwargs
1880
+ }
1878
1881
  return self._create_component_from_model(
1879
- model=parsed_model, config=config, **matching_parameters
1882
+ model=parsed_model, config=config, **(matching_parameters | matching_kwargs)
1880
1883
  )
1881
1884
  except TypeError as error:
1882
1885
  missing_parameters = self._extract_missing_parameters(error)
@@ -2871,7 +2874,7 @@ class ModelToComponentFactory:
2871
2874
  )
2872
2875
 
2873
2876
  def create_parent_stream_config(
2874
- self, model: ParentStreamConfigModel, config: Config, **kwargs: Any
2877
+ self, model: ParentStreamConfigModel, config: Config, stream_name: str, **kwargs: Any
2875
2878
  ) -> ParentStreamConfig:
2876
2879
  declarative_stream = self._create_component_from_model(
2877
2880
  model.stream,
@@ -3152,7 +3155,7 @@ class ModelToComponentFactory:
3152
3155
  _url_base: str = (
3153
3156
  model.requester.url_base
3154
3157
  if hasattr(model.requester, "url_base") and model.requester.url_base is not None
3155
- else req.get_url(stream_state=None, stream_slice=None, next_page_token=None)
3158
+ else req.get_url_base(stream_state=None, stream_slice=None, next_page_token=None)
3156
3159
  )
3157
3160
 
3158
3161
  return _url or _url_base
@@ -3695,11 +3698,11 @@ class ModelToComponentFactory:
3695
3698
  )
3696
3699
 
3697
3700
  def _create_message_repository_substream_wrapper(
3698
- self, model: ParentStreamConfigModel, config: Config, **kwargs: Any
3701
+ self, model: ParentStreamConfigModel, config: Config, *, stream_name: str, **kwargs: Any
3699
3702
  ) -> Any:
3700
3703
  # getting the parent state
3701
3704
  child_state = self._connector_state_manager.get_stream_state(
3702
- kwargs["stream_name"], None
3705
+ stream_name, None
3703
3706
  )
3704
3707
 
3705
3708
  # This flag will be used exclusively for StateDelegatingStream when a parent stream is created
@@ -3731,8 +3734,8 @@ class ModelToComponentFactory:
3731
3734
  ),
3732
3735
  )
3733
3736
 
3734
- return substream_factory._create_component_from_model(
3735
- model=model, config=config, has_parent_state=has_parent_state, **kwargs
3737
+ return substream_factory.create_parent_stream_config(
3738
+ model=model, config=config, stream_name=stream_name, **kwargs
3736
3739
  )
3737
3740
 
3738
3741
  def _instantiate_parent_stream_state_manager(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.62.0.dev0
3
+ Version: 6.62.0.dev2
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -170,7 +170,7 @@ airbyte_cdk/sources/declarative/parsers/custom_exceptions.py,sha256=wnRUP0Xeru9R
170
170
  airbyte_cdk/sources/declarative/parsers/manifest_component_transformer.py,sha256=2UdpCz3yi7ISZTyqkQXSSy3dMxeyOWqV7OlAS5b9GVg,11568
171
171
  airbyte_cdk/sources/declarative/parsers/manifest_normalizer.py,sha256=EtKjS9c94yNp3AwQC8KUCQaAYW5T3zvFYxoWYjc_buI,19729
172
172
  airbyte_cdk/sources/declarative/parsers/manifest_reference_resolver.py,sha256=pJmg78vqE5VfUrF_KJnWjucQ4k9IWFULeAxHCowrHXE,6806
173
- airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=afI8V9Jru-uirOngbrIqGa6ehF_iIW784DZ2-ynOkJQ,182409
173
+ airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py,sha256=8S4gLorSSJnLfF-HgT31RhuQYjYS-isYdstbiLz_0As,182652
174
174
  airbyte_cdk/sources/declarative/partition_routers/__init__.py,sha256=TBC9AkGaUqHm2IKHMPN6punBIcY5tWGULowcLoAVkfw,1109
175
175
  airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py,sha256=VelO7zKqKtzMJ35jyFeg0ypJLQC0plqqIBNXoBW1G2E,3001
176
176
  airbyte_cdk/sources/declarative/partition_routers/cartesian_product_stream_slicer.py,sha256=ocm4hZ4k-tEGs5HLrtI8ecWSK0hGqNH0Rvz2byx_HZk,6927
@@ -455,9 +455,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
455
455
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
456
456
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
457
457
  airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
458
- airbyte_cdk-6.62.0.dev0.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
459
- airbyte_cdk-6.62.0.dev0.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
460
- airbyte_cdk-6.62.0.dev0.dist-info/METADATA,sha256=H19X4zzlfFC82fKM0Zj1tvTPPdaLpZsa9I0dmBxo9SA,6700
461
- airbyte_cdk-6.62.0.dev0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
462
- airbyte_cdk-6.62.0.dev0.dist-info/entry_points.txt,sha256=eLZ2UYvJZGm1s07Pplcs--1Gim60YhZWTb53j_dghwU,195
463
- airbyte_cdk-6.62.0.dev0.dist-info/RECORD,,
458
+ airbyte_cdk-6.62.0.dev2.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
459
+ airbyte_cdk-6.62.0.dev2.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
460
+ airbyte_cdk-6.62.0.dev2.dist-info/METADATA,sha256=AglM-Ab_D8Xe0588UIRdMiKIh5iZ1CV7xEqP_5PlQKY,6700
461
+ airbyte_cdk-6.62.0.dev2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
462
+ airbyte_cdk-6.62.0.dev2.dist-info/entry_points.txt,sha256=eLZ2UYvJZGm1s07Pplcs--1Gim60YhZWTb53j_dghwU,195
463
+ airbyte_cdk-6.62.0.dev2.dist-info/RECORD,,