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.
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 importaio
orglib
. 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.