From 0a7dbb146a914f7be9c0ba595805a7f449a4560a Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 7 Sep 2023 18:21:04 -0500 Subject: [PATCH] feat: don't import backends by default Since the top-level `__init__.py` is always imported when any subpackage is imported, this caused both backends (glib and aio) to always be imported. This is not desirable, since it means that the glib backend will always be imported, even if the user only wants to use the aio. This wastes resources and in some cases can even cause a crash. Fixes: https://github.com/Bluetooth-Devices/dbus-fast/issues/242 --- src/dbus_fast/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dbus_fast/__init__.py b/src/dbus_fast/__init__.py index 8ebade4f..28fbe471 100644 --- a/src/dbus_fast/__init__.py +++ b/src/dbus_fast/__init__.py @@ -1,4 +1,4 @@ -from . import aio, glib, introspection, message_bus, proxy_object, service +from . import introspection, message_bus, proxy_object, service from .constants import ( ArgDirection, BusType, @@ -40,8 +40,6 @@ ) __all__ = [ - "aio", - "glib", "introspection", "message_bus", "proxy_object",