unstructured-ingest 1.0.46.dev0__py3-none-any.whl → 1.0.47__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.

Potentially problematic release.


This version of unstructured-ingest might be problematic. Click here for more details.

@@ -1 +1 @@
1
- __version__ = "1.0.46-dev0" # pragma: no cover
1
+ __version__ = "1.0.47" # pragma: no cover
@@ -134,8 +134,15 @@ class DeltaTableUploader(Uploader):
134
134
 
135
135
  response = s3_client.get_bucket_location(Bucket=bucket_name)
136
136
 
137
- if self.connection_config.aws_region != response.get("LocationConstraint"):
138
- raise ValueError("Wrong AWS Region was provided.")
137
+ bucket_region = _normalize_location_constraint(response.get("LocationConstraint"))
138
+
139
+ if self.connection_config.aws_region != bucket_region:
140
+ raise ValueError(
141
+ "Wrong AWS region provided: bucket "
142
+ f"'{bucket_name}' resides in '{bucket_region}', "
143
+ "but configuration specifies "
144
+ f"'{self.connection_config.aws_region}'."
145
+ )
139
146
 
140
147
  except Exception as e:
141
148
  logger.error(f"failed to validate connection: {e}", exc_info=True)
@@ -270,6 +277,29 @@ class DeltaTableUploader(Uploader):
270
277
  self.upload_dataframe(df=df, file_data=file_data)
271
278
 
272
279
 
280
+ def _normalize_location_constraint(location: Optional[str]) -> str:
281
+ """Return canonical AWS region name for a LocationConstraint value.
282
+
283
+ The S3 GetBucketLocation operation returns `null` (`None`) for buckets in
284
+ the legacy `us-east-1` region and `EU` for very old buckets that were
285
+ created in the historical `EU` region (now `eu-west-1`). For every other
286
+ region the API already returns the correct AWS region string. This helper
287
+ normalises the legacy values so callers can reliably compare regions.
288
+
289
+ Args:
290
+ location: The LocationConstraint value returned by the S3 GetBucketLocation operation.
291
+
292
+ Returns:
293
+ The canonical AWS region name for the given location constraint.
294
+ """
295
+
296
+ if location is None:
297
+ return "us-east-1"
298
+ if location == "EU":
299
+ return "eu-west-1"
300
+ return location
301
+
302
+
273
303
  delta_table_destination_entry = DestinationRegistryEntry(
274
304
  connection_config=DeltaTableConnectionConfig,
275
305
  uploader=DeltaTableUploader,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unstructured_ingest
3
- Version: 1.0.46.dev0
3
+ Version: 1.0.47
4
4
  Summary: Local ETL data pipeline to get data RAG ready
5
5
  Author-email: Unstructured Technologies <devops@unstructuredai.io>
6
6
  License-Expression: Apache-2.0
@@ -1,5 +1,5 @@
1
1
  unstructured_ingest/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
2
- unstructured_ingest/__version__.py,sha256=IKm0h9VzCLTBY4HULhS6HxTXk7DRRvPTI9GEd28jGJM,48
2
+ unstructured_ingest/__version__.py,sha256=rFTHo5GbeY5iutF7YtQvcvr4a80vRev0oVWJS3ZURIY,43
3
3
  unstructured_ingest/error.py,sha256=qDncnJgbf5ils956RcO2CGlAKYDT5OaEM9Clv1JVTNc,1448
4
4
  unstructured_ingest/errors_v2.py,sha256=9RuRCi7lbDxCguDz07y5RiHoQiFIOWwOD7xqzJ2B3Yw,436
5
5
  unstructured_ingest/logger.py,sha256=7e_7UeK6hVOd5BQ6i9NzRUAPCS_DF839Y8TjUDywraY,1428
@@ -68,7 +68,7 @@ unstructured_ingest/processes/connectors/azure_ai_search.py,sha256=szhSRXzUHk0DE
68
68
  unstructured_ingest/processes/connectors/chroma.py,sha256=q5_Fu4xb6_W_NyrPxVa3-jVwZLqVdlBNlR4dFvbd7l0,7235
69
69
  unstructured_ingest/processes/connectors/confluence.py,sha256=aA2B_FPdAjlVAJtmMldYu6lld2sR-6JL5tWh7yItiwg,22828
70
70
  unstructured_ingest/processes/connectors/couchbase.py,sha256=KCHoYDNya9B05NIB5D78zXoizFyfpJRepcYBe1nLSOs,12298
71
- unstructured_ingest/processes/connectors/delta_table.py,sha256=JrpiX9V-YD1VhExKi6KFwlYatCheSs3t-xB3Td1BVFk,11487
71
+ unstructured_ingest/processes/connectors/delta_table.py,sha256=Y0P-4knPBc7Q8QwlvlDe6ksIKppNY4dBZhC1vwGARi0,12661
72
72
  unstructured_ingest/processes/connectors/discord.py,sha256=CD-SBECMdr3pnmqbPvBMyPU2cBroXUhyW6F7L3laP6A,5348
73
73
  unstructured_ingest/processes/connectors/github.py,sha256=smHCz6jOH1p_hW2S25bYunBBj_pYjz8HTw6wkzaJz_A,7765
74
74
  unstructured_ingest/processes/connectors/gitlab.py,sha256=Fdq6_lk-By1JDmLGVjoKJkaHESiKTZsbvoHhMsljlE0,10114
@@ -231,8 +231,8 @@ unstructured_ingest/utils/ndjson.py,sha256=nz8VUOPEgAFdhaDOpuveknvCU4x82fVwqE01q
231
231
  unstructured_ingest/utils/pydantic_models.py,sha256=BT_j15e4rX40wQbt8LUXbqfPhA3rJn1PHTI_G_A_EHY,1720
232
232
  unstructured_ingest/utils/string_and_date_utils.py,sha256=oXOI6rxXq-8ncbk7EoJK0WCcTXWj75EzKl8pfQMID3U,2522
233
233
  unstructured_ingest/utils/table.py,sha256=WZechczgVFvlodUWFcsnCGvBNh1xRm6hr0VbJTPxKAc,3669
234
- unstructured_ingest-1.0.46.dev0.dist-info/METADATA,sha256=nT9dK2ltS-aMKLa_nCewjwQSUYlaDVnvNUNoWDwjHPw,8847
235
- unstructured_ingest-1.0.46.dev0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
236
- unstructured_ingest-1.0.46.dev0.dist-info/entry_points.txt,sha256=gUAAFnjFPnBgThJSEbw0N5ZjxtaKlT1s9e05_arQrNw,70
237
- unstructured_ingest-1.0.46.dev0.dist-info/licenses/LICENSE.md,sha256=SxkKP_62uIAKb9mb1eH7FH4Kn2aYT09fgjKpJt5PyTk,11360
238
- unstructured_ingest-1.0.46.dev0.dist-info/RECORD,,
234
+ unstructured_ingest-1.0.47.dist-info/METADATA,sha256=5Gyz-XAN5UP3BAdN2AFurLlOigiFBxi6qB2H42HrI7g,8842
235
+ unstructured_ingest-1.0.47.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
236
+ unstructured_ingest-1.0.47.dist-info/entry_points.txt,sha256=gUAAFnjFPnBgThJSEbw0N5ZjxtaKlT1s9e05_arQrNw,70
237
+ unstructured_ingest-1.0.47.dist-info/licenses/LICENSE.md,sha256=SxkKP_62uIAKb9mb1eH7FH4Kn2aYT09fgjKpJt5PyTk,11360
238
+ unstructured_ingest-1.0.47.dist-info/RECORD,,