-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: don't import backends by default #243
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #243 +/- ##
==========================================
+ Coverage 82.81% 82.84% +0.03%
==========================================
Files 28 28
Lines 3259 3259
Branches 674 674
==========================================
+ Hits 2699 2700 +1
+ Misses 343 342 -1
Partials 217 217
☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here. |
Technically, this is an API breaking change, but I think the only thing it would break is: import dbus_fast
dbus_fast.aio.something or from dbus_fast import *
aio.something which I hope would be quite rare. |
We should probably mark it as a breaking change. Testing this now |
0a7dbb1
to
b86dd85
Compare
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
b86dd85
to
d2a0104
Compare
Pushed to all my production. Nothing broke. Let's hope thats the case for everyone else |
Thanks @dlech |
Everything was ok with the dep bump except
|
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