Skip to content

Commit

Permalink
feat: don't import backends by default
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
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: #242
  • Loading branch information
dlech committed Sep 7, 2023
1 parent 6c3d8c1 commit d2a0104
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/dbus_fast/__init__.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -40,8 +40,6 @@
)

__all__ = [
"aio",
"glib",
"introspection",
"message_bus",
"proxy_object",
Expand Down

0 comments on commit d2a0104

Please sign in to comment.