airbyte-cdk 6.36.2__py3-none-any.whl → 6.36.3.dev0__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.
@@ -5,7 +5,7 @@ import json
5
5
  import logging
6
6
  from abc import ABC, abstractmethod
7
7
  from dataclasses import dataclass
8
- from io import BufferedIOBase, TextIOWrapper
8
+ from io import BufferedIOBase, BytesIO, TextIOWrapper
9
9
  from typing import Any, Generator, MutableMapping, Optional
10
10
 
11
11
  import orjson
@@ -124,7 +124,8 @@ class CsvParser(Parser):
124
124
  """
125
125
  Parse CSV data from decompressed bytes.
126
126
  """
127
- text_data = TextIOWrapper(data, encoding=self.encoding) # type: ignore
127
+ bytes_data = BytesIO(data.read())
128
+ text_data = TextIOWrapper(bytes_data, encoding=self.encoding) # type: ignore
128
129
  reader = csv.DictReader(text_data, delimiter=self._get_delimiter() or ",")
129
130
  for row in reader:
130
131
  yield row
@@ -151,6 +152,8 @@ class CompositeRawDecoder(Decoder):
151
152
  self, response: requests.Response
152
153
  ) -> Generator[MutableMapping[str, Any], None, None]:
153
154
  if self.is_stream_response():
155
+ response.raw.auto_close = False
154
156
  yield from self.parser.parse(data=response.raw) # type: ignore[arg-type]
157
+ response.raw.close()
155
158
  else:
156
159
  yield from self.parser.parse(data=io.BytesIO(response.content))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.36.2
3
+ Version: 6.36.3.dev0
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -75,7 +75,7 @@ airbyte_cdk/sources/declarative/declarative_component_schema.yaml,sha256=5o5Gslt
75
75
  airbyte_cdk/sources/declarative/declarative_source.py,sha256=nF7wBqFd3AQmEKAm4CnIo29CJoQL562cJGSCeL8U8bA,1531
76
76
  airbyte_cdk/sources/declarative/declarative_stream.py,sha256=venZjfpvtqr3oFSuvMBWtn4h9ayLhD4L65ACuXCDZ64,10445
77
77
  airbyte_cdk/sources/declarative/decoders/__init__.py,sha256=JHb_0d3SE6kNY10mxA5YBEKPeSbsWYjByq1gUQxepoE,953
78
- airbyte_cdk/sources/declarative/decoders/composite_raw_decoder.py,sha256=DJbWaaJ5LHCBpyWz-4bEw8rqtJYqabEYZtxnfRtWFE0,4946
78
+ airbyte_cdk/sources/declarative/decoders/composite_raw_decoder.py,sha256=54ag8xx_BcZcXuhVp1VkC2AE-KdY2cUgLVUORWaP-ig,5080
79
79
  airbyte_cdk/sources/declarative/decoders/decoder.py,sha256=sl-Gt8lXi7yD2Q-sD8je5QS2PbgrgsYjxRLWsay7DMc,826
80
80
  airbyte_cdk/sources/declarative/decoders/json_decoder.py,sha256=BdWpXXPhEGf_zknggJmhojLosmxuw51RBVTS0jvdCPc,2080
81
81
  airbyte_cdk/sources/declarative/decoders/noop_decoder.py,sha256=iZh0yKY_JzgBnJWiubEusf5c0o6Khd-8EWFWT-8EgFo,542
@@ -360,9 +360,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
360
360
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
361
361
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
362
362
  airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
363
- airbyte_cdk-6.36.2.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
364
- airbyte_cdk-6.36.2.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
365
- airbyte_cdk-6.36.2.dist-info/METADATA,sha256=un3DK_o5RZ4nnhj5U_QBHoYqSfUYbAHBb4cfAEModjk,6010
366
- airbyte_cdk-6.36.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
367
- airbyte_cdk-6.36.2.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
368
- airbyte_cdk-6.36.2.dist-info/RECORD,,
363
+ airbyte_cdk-6.36.3.dev0.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
364
+ airbyte_cdk-6.36.3.dev0.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
365
+ airbyte_cdk-6.36.3.dev0.dist-info/METADATA,sha256=IvkvzmBsCDO9JoaNx-h-185jaiJA7VWpfnKB6cgw-W0,6015
366
+ airbyte_cdk-6.36.3.dev0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
367
+ airbyte_cdk-6.36.3.dev0.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
368
+ airbyte_cdk-6.36.3.dev0.dist-info/RECORD,,