Merge branch 'main' into defer-boto3-import

This commit is contained in:
Abdul Fatir 2026-04-21 15:01:47 +02:00 committed by GitHub
commit a01ddf0b81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -108,7 +108,7 @@ def cache_model_from_s3(
boto3_session: boto3.Session | None = None,
):
assert re.match("^s3://([^/]+)/(.*?([^/]+)/?)$", s3_uri) is not None, f"Not a valid S3 URI: {s3_uri}"
cache_home = Path(os.environ.get("XGD_CACHE_HOME", os.path.expanduser("~/.cache")))
cache_home = Path(os.environ.get("XDG_CACHE_HOME", os.path.expanduser("~/.cache")))
cache_dir = cache_home / "chronos"
s3_uri = s3_uri.rstrip("/")
bucket, prefix = s3_uri.replace("s3://", "").split("/", 1)