Skip to content

Commit 05aaca7

Browse files
relax starlette dependency and fix import style (#522)
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
1 parent e8f7e26 commit 05aaca7

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

.changeset/soft-boats-speak.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trackio": patch
3+
---
4+
5+
feat:relax `starlette` dependency and fix import style

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ requires-python = ">=3.10"
1515
dependencies = [
1616
"huggingface-hub>=1.10.0,<2",
1717
"gradio-client>=2.0.0,<3.0.0",
18-
"starlette>=1.0.0,<2",
18+
"starlette<2.0.0",
1919
"python-multipart>=0.0.9,<1.0.0",
2020
"uvicorn[standard]>=0.30.0,<1.0.0",
2121
"numpy<3.0.0",

trackio/bucket_storage.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from pathlib import Path
44

55
import huggingface_hub
6-
from huggingface_hub import copy_files, sync_bucket
76

87
from trackio.sqlite_storage import SQLiteStorage
98
from trackio.utils import MEDIA_DIR, TRACKIO_DIR
@@ -24,7 +23,7 @@ def _list_bucket_file_paths(bucket_id: str, prefix: str | None = None) -> list[s
2423

2524
def download_bucket_to_trackio_dir(bucket_id: str) -> None:
2625
TRACKIO_DIR.mkdir(parents=True, exist_ok=True)
27-
sync_bucket(
26+
huggingface_hub.sync_bucket(
2827
source=f"hf://buckets/{bucket_id}/trackio",
2928
dest=str(TRACKIO_DIR),
3029
quiet=True,
@@ -119,7 +118,7 @@ def _copy_project_media_between_buckets(
119118
if not media_to_copy:
120119
return
121120

122-
copy_files(
121+
huggingface_hub.copy_files(
123122
f"hf://buckets/{source_bucket_id}/{source_media_prefix}",
124123
f"hf://buckets/{dest_bucket_id}/media/",
125124
)

0 commit comments

Comments
 (0)