Просмотр исходного кода

chore: update opendal version (#14343)

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
tags/1.1.0
yihong 7 месяцев назад
Родитель
Сommit
c960b364c9
Аккаунт пользователя с таким Email не найден
3 измененных файлов: 4 добавлений и 11 удалений
  1. 2
    9
      api/extensions/storage/opendal_storage.py
  2. 1
    1
      api/poetry.lock
  3. 1
    1
      api/pyproject.toml

+ 2
- 9
api/extensions/storage/opendal_storage.py Просмотреть файл

@@ -71,15 +71,8 @@ class OpenDALStorage(BaseStorage):
logger.debug(f"file {filename} downloaded to {target_filepath}")

def exists(self, filename: str) -> bool:
# FIXME this is a workaround for opendal python-binding do not have a exists method and no better
# error handler here when opendal python-binding has a exists method, we should use it
# more https://github.com/apache/opendal/blob/main/bindings/python/src/operator.rs
try:
res: bool = self.op.stat(path=filename).mode.is_file()
logger.debug(f"file {filename} checked")
return res
except Exception:
return False
res: bool = self.op.exists(path=filename)
return res

def delete(self, filename: str):
if self.exists(filename):

+ 1
- 1
api/poetry.lock Просмотреть файл

@@ -10228,4 +10228,4 @@ cffi = ["cffi (>=1.11)"]
[metadata]
lock-version = "2.1"
python-versions = ">=3.11,<3.13"
content-hash = "8e6eaed521da966cfcdb5400e9d3aedb7623b5ac6a8da428d9f984af22542cce"
content-hash = "5ed3febffb932561050bba56b04bd03ffec7d54a7d26b95ad42c55ef45e07fae"

+ 1
- 1
api/pyproject.toml Просмотреть файл

@@ -105,7 +105,7 @@ bce-python-sdk = "~0.9.23"
cos-python-sdk-v5 = "1.9.30"
esdk-obs-python = "3.24.6.1"
google-cloud-storage = "2.16.0"
opendal = "~0.45.12"
opendal = "~0.45.16"
oss2 = "2.18.5"
supabase = "~2.8.1"
tos = "~2.7.1"

Загрузка…
Отмена
Сохранить