zenoh-python icon indicating copy to clipboard operation
zenoh-python copied to clipboard

Bring back asyncio examples

Open jonglezb opened this issue 10 months ago • 5 comments

The examples were added in #48 and subsequently deleted in 280385977323c411bb6f80358dadae83413237d9

It's not clear why these asyncio examples were removed: they appear to work fine and are important to show that zenoh is compatible with asyncio.

Tested with eclipse-zenoh==0.10.1rc0 and Python 3.11 on Debian.

jonglezb avatar Apr 18 '24 16:04 jonglezb

Hello @jonglezb , the reason asyncio were removed in the past is because it provided an asyncio API but not real async was happening under the hood because of some limitation of PyO3 bindings generator. So, it gave the impression to be using async while in reality it was not. To avoid any misconception we decided to remove them.

It seems now there are some activity on bridging the gaps between async-Python and async-Rust (e.g.: https://github.com/awestlake87/pyo3-asyncio) but still need to be considered and eventually integrated within Zenoh. Until that moment I believe it's not wise to reintegrate the examples for the above reasons.

Mallets avatar Apr 22 '24 10:04 Mallets

Just wanted to throw my hat in the ring and say that I think bringing in async support is absolutely critical if we hope for this library to gain wide adoption in the python community.

I'm evaluating zenoh for streaming data into a GUI built with python. GUIs are some of the strongest use cases for zenoh in my mind and almost always require some sort of async thing.

keenanjohnson avatar May 07 '24 00:05 keenanjohnson

I know that https://github.com/eclipse-zenoh/zenoh-python/issues/95 is still open, but listed as won't fix which is a bit confusing to someone like me coming into the project and trying to learn / figure out what the state of things are.

keenanjohnson avatar May 07 '24 00:05 keenanjohnson

I know that #95 is still open, but listed as won't fix which is a bit confusing to someone like me coming into the project and trying to learn / figure out what the state of things are.

Thanks for pointing out the won't fix label, this is not actually the intention. async is still in the project radar for being reintroduced but it needs to be reintroduced properly. One doesn't simply reintroduce async (or walk into Mordor)... Some preparatory work needs to happen before reintroducing it. As said before, having an async keyword in the API doesn't necessarily means the API is async. But we will get there... :)

Mallets avatar May 07 '24 07:05 Mallets

Thanks! Yeah based on the discussion it didn't seem like the won't fix label made sense :) @Mallets

keenanjohnson avatar May 07 '24 18:05 keenanjohnson