Git Product home page Git Product logo

Comments (10)

annatisch avatar annatisch commented on June 12, 2024 2

Hi @thedrow - I've taken a look and I don't think there's too much work involved.
However we're are currently discussing internally whether we want to invest further in the C-binding-based project, or whether we want to remove the C layer and replace with a pure-python based implementation (prototype currently ongoing in the pyproto branch).
If we opt for the latter - we could build in AnyIO support from the ground-up.

We are also cautious about taking a direct dependency on the lib - so we we're working through what the implementation look like if it were both fully-compatible with AnyIO as well as standalone.

Will keep this thread updated :)

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024 1

Thanks @thedrow - yes it is likely we will refactor this imminently.
We're already seeing warnings about the passing around of loop, so I would like to get that cleaned up - although we may not get to it within a given timeframe.

I will do my best to scope out the needed work within the next few days.

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024 1

Hi @JonasKs!
We are currently rewriting this library in pure Python, with the first preview targeted for early 2022.
Development is progressing in this branch: https://github.com/Azure/azure-uamqp-python/tree/pyproto

Given that we are currently rebuilding from scratch - we will not be making these changes to the C-based implementation of uamqp.
So then the question becomes, will the pure Python version of the library use AnyIO. The first preview will not unfortunately - we wanted to focus our efforts on correct end-to-end implementation of the protocol. In subsequent releases we plan to drop the hard dependency on AsyncIO to allow more flexibility here.
My earlier tests with AnyIO (albeit 2 years ago now) introduced a significant perf regression that prevented us from quickly making the shift earlier and needed deeper investigation.

from azure-uamqp-python.

JonasKs avatar JonasKs commented on June 12, 2024 1

Awesome! Thanks for the quick reply. Good luck with the release 🚀

from azure-uamqp-python.

thedrow avatar thedrow commented on June 12, 2024

I'm not going to work on this until we have a consensus on what needs to be done.
Please address this issue as quickly as possible. Thanks :).

from azure-uamqp-python.

annatisch avatar annatisch commented on June 12, 2024

Thanks @thedrow!
We wanted to make these changes about a year ago, but at the time it wasn't easy because we were using some very asyncio-specific features like run_in_executor for which we needed to pass through the event loop.
However I think our dependency on the asyncio loop has now been refactored out, in which case it would be awesome to make this change as you've proposed.

Though I know we're using asyncio.sleep - is trio compatible with that?

from azure-uamqp-python.

thedrow avatar thedrow commented on June 12, 2024

Of course it does. Trio also supports running tasks in threads.
AnyIO abstracts sleep as well as most other mechanisms.

Is there any chance you'll refactor this on your own?
If not, where are the tests for the asynchronous code?

from azure-uamqp-python.

thedrow avatar thedrow commented on June 12, 2024

@annatisch Any updates?

from azure-uamqp-python.

thedrow avatar thedrow commented on June 12, 2024

@annatisch Pinging you once more, with feeling ;)

from azure-uamqp-python.

JonasKs avatar JonasKs commented on June 12, 2024

Hi @annatisch, did you land on anything? 😊

from azure-uamqp-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.