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>
This commit is contained in:
yihong 2025-03-11 20:44:09 +08:00 committed by GitHub
parent b817036343
commit c960b364c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 11 deletions

View File

@ -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):

2
api/poetry.lock generated
View File

@ -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"

View File

@ -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"