Bluetooth-Devices / dbus-fast

A faster version of dbus-next
MIT License
35 stars 8 forks source link

Allow use without importing `glib` backend. #242

Closed dlech closed 12 months ago

dlech commented 12 months ago

Is your feature request related to a problem? Please describe. This came up in https://github.com/hbldh/bleak/issues/1412

In addition to avoiding a crash like in this case, it would be nice to improve startup time and reduce memory usage on constrained systems where gi is installed.

Describe the solution you'd like The top-level __init__.py should not import aio or glib. It should be up to the library user to import the backend they want to use.

Additional context I also wouldn't be opposed to dropping the glib backend completely and making this library asyncio-only.

bdraco commented 12 months ago

Thats a good idea. I'm not sure if we should drop glib completely though, but definitely run time load