https://opendal.apache.org/ logo
So, for python bindings, I have some new
# general
c
So, for python bindings, I have some new info: 1) after the recent refactoring, I managed to get [opendalfs](https://github.com/fsspec/opendalfs) working, WITH duckdb/ polars etc. will raise a PR for this soon. 🚀 2) for File/ AsyncFile there is a known file to read things chunk by chunk in a loop (https://github.com/apache/opendal/issues/4990). there are tests for EOF, but if a range needs to be read, this needs to loop with
tell
. So i had a suggestion to maybe rename the current implementation to
read_chunk
and have a new and direct
read
which handles this. It was quite confusing for me to find the root cause and I'm assuming it will be the same for new users as well. 3) There are a lot of services which are disabled for py bindings, I'd like to re-enable some of them, shall I raise a PR for this? ref: [open discussion](https://github.com/apache/opendal/discussions/6536) 4) since opendal has telemetry and other useful layers, I'd like to add them to python side. this will be great while working with duckdb/ 5) should probably do a release post some of these ?
@Xuanwo thoughts on point 2 ?
x
1. fantastic! looking forward to that! 2. I didn’t quite understand this issue. Python’s API docs say that
read
should return data in chunks, and users need to keep reading until EOF. Is it expected to always return all the data? https://docs.python.org/3/library/io.html#io.RawIOBase.read 3. I wish we could add them dynamically so users can use whatever service they want. I believe this will make it much easier after OpenDAL core's crate split. 4. The same to three. One concern I have is whether layers like metrics can work on the Python side. It seems we need to provide the collector at the same time. 5. Yes, we are on the progress of releasing now.
c
2. okay, but can i atleast add this to the stub docstrings then so that the behaviour is clear ? for 3 4 I can start the work as is, and then later split this maybe. For this I raised [this](https://github.com/astral-sh/uv/issues/16465) and the uv team member responded that it is not supported as of now.
x
2. what's the chane you expected? Adding a
read_chunk
without change
read
? 3. No, it doesn’t work that way. I expected us to have python packages called
opendal-service-s3
and import them when needed.
c
for 2 i was thinking to rename the existing implementation to
read_chunk
and add a new read which basically does the while loop thing on rust side. for 3 so you want to publish each service (and even layer to pypi) with all the wheels for different architectures?
x
for 2 sorry I didn’t get it. Our current behavior aligns with the python’s documentation, right? for 3, yes, i wish we could do that instead of putting them in the same wheel
c
yes for 2 it does, but for the sake of keeping things clear i've raised [this](https://github.com/apache/opendal/pull/6744). Adds the note about this clearly. for 3, i got your point, will check this out next. for now, I have raised [this](https://github.com/apache/opendal/pull/6745) final refactoring PR to re-enable the left out services.
x
for 2, oh yes, the note is great for 3, I actually don’t know why we need to push this. Do you want to any service of them? In fact we are considering removing part of them.
Some service are not well maintained and lack of tests, I’m concerned about exposing them. That’s also why we want to split the crates. I want to add different maturity levels for those services in the future
c
for 3, yes at work i need them. 😄 need the Ftp, sftp and HdfsNative out of the 14 that i added.
x
Like s3, fs, … are stable, welcome to use. ftp had tests covered but no known users, use carefo
Ok, let’s just add ftp, sftp and hdfs_native as you wish
c
im working with ancient europeans, and the data is in all sorts of fossil like systems
x
For other services, I prefer to keep them as is until we have real user requests.
c
this is also the reason for working on the fsspec interface, so that analytics can work with duckdb/ polars
x
Aha, got it🫡
That’s nice. Thank you for working on this.
c
no probs, its been fun. will make the change to enable only the 3.
x
Nice!
c
done!