On Thu, Dec 16, 2021 at 5:19 AM Daniel P. Berrangé <berra...@redhat.com> wrote:
> On Wed, Dec 15, 2021 at 02:39:17PM -0500, John Snow wrote: > > Copy the remaining type definitions from QMP into the qemu.aqmp.legacy > > module. Now, most users don't need to import anything else but > > qemu.aqmp.legacy. > > I'm probably missing the historical discussion but it feels very > wierd to be saying > > "most users don't need anything except <something> legacy" > > Naively, I'd expect most users to want something *not* legacy. > > > Regards, > Daniel > The legacy.py module is a wrapper that pretends to be the QEMUMonitorProtocol class written by Luiz Capitulino. It exists as a synchronous wrapper around the async core. However, it's not a design that I think actually makes sense long-term for the library as a standalone project, so I named it legacy to intuit that it's providing compatibility for an older interface. The goal is to eventually remove it in favor of a sync.py that has a sync interface that's more closely aligned to the async core. I've got a series for this, but I wanted to pursue this tree-wide switcheroo first. As for the phrasing, I suppose I mean: "most users [that need the legacy interface] don't need to import both the old interface AND the legacy wrapper that mimics it, they can just import the legacy wrapper."