Re: DBussy Future Compatibility
Lawrence D'Oliveiro <ldo-kC51rjc0cqs1dNLGKZg6taU/[email protected]> Tue, 3 Mar 2026 13:32:54 +1300
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Organization | Geek Central |
| Message-ID | <[email protected]> |
On Sat, 31 May 2025 15:56:58 +1200, I wrote: > At some point, I will need to fix the DBussy modules themselves. The > hooks into asyncio start with the attach_asyncio() calls in the > Connection and Server objects (in both modules); currently these > allow you to omit the loop argument, whereupon > asyncio.get_event_loop() is called to attach them to the =E2=80=9Ccurrent= =E2=80=9D > event loop. >=20 > That will need to be changed to default to asyncio.get_running_loop() > instead, which means those calls will no longer be valid unless you a) > explicitly specify a loop, or b) are already within some > currently-running task. I expect the latter will be the more common > situation. That means you only create asynchronously-operating > instances of these objects within code that is already running > asynchronously. This is now done.