datachain 0.8.5__py3-none-any.whl → 0.8.7__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 datachain might be problematic. Click here for more details.

datachain/client/s3.py CHANGED
@@ -1,4 +1,5 @@
1
1
  import asyncio
2
+ import os
2
3
  from typing import Any, Optional, cast
3
4
  from urllib.parse import parse_qs, urlsplit, urlunsplit
4
5
 
@@ -31,15 +32,20 @@ class ClientS3(Client):
31
32
  if "aws_token" in kwargs:
32
33
  kwargs.setdefault("token", kwargs.pop("aws_token"))
33
34
 
34
- # caching bucket regions to use the right one in signed urls, otherwise
35
- # it tries to randomly guess and creates wrong signature
36
- kwargs.setdefault("cache_regions", True)
37
-
38
35
  # We want to use newer v4 signature version since regions added after
39
36
  # 2014 are not going to support v2 which is the older one.
40
37
  # All regions support v4.
41
38
  kwargs.setdefault("config_kwargs", {}).setdefault("signature_version", "s3v4")
42
39
 
40
+ if "region_name" in kwargs:
41
+ kwargs["config_kwargs"].setdefault("region_name", kwargs.pop("region_name"))
42
+
43
+ # remove this `if` when https://github.com/fsspec/s3fs/pull/929 lands
44
+ if not os.environ.get("AWS_REGION") and not os.environ.get("AWS_ENDPOINT_URL"):
45
+ # caching bucket regions to use the right one in signed urls, otherwise
46
+ # it tries to randomly guess and creates wrong signature
47
+ kwargs.setdefault("cache_regions", True)
48
+
43
49
  if not kwargs.get("anon"):
44
50
  try:
45
51
  # Run an inexpensive check to see if credentials are available
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: datachain
3
- Version: 0.8.5
3
+ Version: 0.8.7
4
4
  Summary: Wrangle unstructured AI data at scale
5
5
  Author-email: Dmitry Petrov <support@dvc.org>
6
6
  License: Apache-2.0
@@ -40,7 +40,7 @@ datachain/client/fsspec.py,sha256=ZelCVAuPnSUYuMD-l7IUsbIKNmWzTm6PKdrlK9Bw5xw,13
40
40
  datachain/client/gcs.py,sha256=-KsOrA_SPS9xCQtizUcI3Iy9lMSY8iVxUSPINOWj7i4,5109
41
41
  datachain/client/hf.py,sha256=XeVJVbiNViZCpn3sfb90Fr8SYO3BdLmfE3hOWMoqInE,951
42
42
  datachain/client/local.py,sha256=iHQKh-HhoNzqZ2yaiuIfZWGXtt_X9FMSA-TN_03zjPc,4708
43
- datachain/client/s3.py,sha256=qPwpHTD934WypEbetPgn0uAiQ31_mTitCVeQr5QkDc0,6965
43
+ datachain/client/s3.py,sha256=bh40oAgnTZ3Diiofk_xU_2iPR0iPHCK8F_WFPHDTizc,7279
44
44
  datachain/data_storage/__init__.py,sha256=9Wit-oe5P46V7CJQTD0BJ5MhOa2Y9h3ddJ4VWTe-Lec,273
45
45
  datachain/data_storage/db_engine.py,sha256=n8ojCbvVMPY2e3SG8fUaaD0b9GkVfpl_Naa_6EiHfWg,3788
46
46
  datachain/data_storage/job.py,sha256=w-7spowjkOa1P5fUVtJou3OltT0L48P0RYWZ9rSJ9-s,383
@@ -133,9 +133,9 @@ datachain/sql/sqlite/vector.py,sha256=ncW4eu2FlJhrP_CIpsvtkUabZlQdl2D5Lgwy_cbfqR
133
133
  datachain/toolkit/__init__.py,sha256=eQ58Q5Yf_Fgv1ZG0IO5dpB4jmP90rk8YxUWmPc1M2Bo,68
134
134
  datachain/toolkit/split.py,sha256=z3zRJNzjWrpPuRw-zgFbCOBKInyYxJew8ygrYQRQLNc,2930
135
135
  datachain/torch/__init__.py,sha256=gIS74PoEPy4TB3X6vx9nLO0Y3sLJzsA8ckn8pRWihJM,579
136
- datachain-0.8.5.dist-info/LICENSE,sha256=8DnqK5yoPI_E50bEg_zsHKZHY2HqPy4rYN338BHQaRA,11344
137
- datachain-0.8.5.dist-info/METADATA,sha256=hwFSeah_bNcAtJvdN_xPnvAFjz17hoK2MCHQbtUZD9I,11064
138
- datachain-0.8.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
139
- datachain-0.8.5.dist-info/entry_points.txt,sha256=0GMJS6B_KWq0m3VT98vQI2YZodAMkn4uReZ_okga9R4,49
140
- datachain-0.8.5.dist-info/top_level.txt,sha256=lZPpdU_2jJABLNIg2kvEOBi8PtsYikbN1OdMLHk8bTg,10
141
- datachain-0.8.5.dist-info/RECORD,,
136
+ datachain-0.8.7.dist-info/LICENSE,sha256=8DnqK5yoPI_E50bEg_zsHKZHY2HqPy4rYN338BHQaRA,11344
137
+ datachain-0.8.7.dist-info/METADATA,sha256=GHZaYcxzi5dXmAaaJgirqiTTWiWMEPgN6MsFAuNiE90,11064
138
+ datachain-0.8.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
139
+ datachain-0.8.7.dist-info/entry_points.txt,sha256=0GMJS6B_KWq0m3VT98vQI2YZodAMkn4uReZ_okga9R4,49
140
+ datachain-0.8.7.dist-info/top_level.txt,sha256=lZPpdU_2jJABLNIg2kvEOBi8PtsYikbN1OdMLHk8bTg,10
141
+ datachain-0.8.7.dist-info/RECORD,,