-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(bindings/python): return bytes directly and add type stub fi…
…le (#1514) * refactor(bindings/python): raise RuntimeError instead of BaseException * refactor(bindings/python): return bytes from `read` * feat(bindings/python): add type stub file
- Loading branch information
Showing
3 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class Operator: | ||
def __init__(scheme: str, **kwargs): ... | ||
def read(self, path: str) -> bytes: ... | ||
def write(self, path: str, bs: bytes): ... | ||
def stat(self, path: str) -> Metadata: ... | ||
|
||
class AsyncOperator: | ||
def __init__(scheme: str, **kwargs): ... | ||
async def read(self, path: str) -> bytes: ... | ||
async def write(self, path: str, bs: bytes): ... | ||
async def stat(self, path: str) -> Metadata: ... | ||
|
||
class Metadata: | ||
def content_length(self) -> int: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5d1b952
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for opendal ready!
✅ Preview
https://opendal-oqwnkzvry-databend.vercel.app
Built with commit 5d1b952.
This pull request is being automatically deployed with vercel-action
5d1b952
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
2
.service_memory_read_full/256 KiB
34963
ns/iter (± 1646
)13821
ns/iter (± 15
)2.53
service_memory_write_once/256 KiB
47263
ns/iter (± 2636
)19126
ns/iter (± 145
)2.47
This comment was automatically generated by workflow using github-action-benchmark.
CC: @Xuanwo