Re: [PATCH RFC 0/7] RFC: Asynchronous QMP Draft

2021-04-19 Thread John Snow
On 4/19/21 10:26 PM, John Snow wrote: On 4/15/21 5:52 AM, Stefan Hajnoczi wrote: Yeah, it seems very nice for allowing multiple event listeners that don't steal each other's events. I like it. qmp.event_listener() could take a sequence of QMP event names to trigger on. If the sequence is empty

Re: [PATCH RFC 0/7] RFC: Asynchronous QMP Draft

2021-04-19 Thread John Snow
On 4/15/21 5:52 AM, Stefan Hajnoczi wrote: Yeah, it seems very nice for allowing multiple event listeners that don't steal each other's events. I like it. qmp.event_listener() could take a sequence of QMP event names to trigger on. If the sequence is empty then all QMP events will be reported.

Re: [PATCH RFC 0/7] RFC: Asynchronous QMP Draft

2021-04-15 Thread Stefan Hajnoczi
On Wed, Apr 14, 2021 at 03:17:48PM -0400, John Snow wrote: > First and foremost, thank you for reviewing this! It is very helpful to me > to see what others think of this pet project I've been growing in the > privacy of my own mind. > > On 4/14/21 2:38 AM, Stefan Hajnoczi wrote: > > Below are the

Re: [PATCH RFC 0/7] RFC: Asynchronous QMP Draft

2021-04-14 Thread John Snow
First and foremost, thank you for reviewing this! It is very helpful to me to see what others think of this pet project I've been growing in the privacy of my own mind. On 4/14/21 2:38 AM, Stefan Hajnoczi wrote: Below are the API docs that I found helpful for understanding the big picture. Th

Re: [PATCH RFC 0/7] RFC: Asynchronous QMP Draft

2021-04-14 Thread Stefan Hajnoczi
Below are the API docs that I found helpful for understanding the big picture. The QMP.execute() API is nice. Regarding QMP events, I can think of two approaches: 1. Callbacks 2. An async get_event(name=Optional[str]) -> object API (plus get_event_nowait(name=Optional[str]) -> object) (There'

[PATCH RFC 0/7] RFC: Asynchronous QMP Draft

2021-04-13 Thread John Snow
(Does not apply to the QEMU tree; this is against a blank repository.) Hi! This is a Draft RFC for an asyncio-based Python library that implements a QMP client. The intent is to eventually publish this library directly to PyPI, so the design focus of this library is to be "useful" instead of provi