Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace dbus-python #984

Open
qarkai opened this issue Oct 28, 2023 · 5 comments
Open

Replace dbus-python #984

qarkai opened this issue Oct 28, 2023 · 5 comments

Comments

@qarkai
Copy link

qarkai commented Oct 28, 2023

馃挕 The Idea
According to https://www.freedesktop.org/wiki/Software/DBusBindings dbus-python is obsolete, recommended libraries are pydbus, txdbus or GDBus/QtDBus bindings. Since project is platform-independent it seems that most appropriate replacement is pydbus.

@qarkai
Copy link
Author

qarkai commented Oct 28, 2023

Well, it seems that pydbus is unmaintained. There are other options, see https://wiki.python.org/moin/DbusExamples

@caronc
Copy link
Owner

caronc commented Oct 28, 2023

I guess dasbus is the ideal solution since we don't support Python v2 or anything less then v3.6 anyway? Not sure how easy it is to adopt and/or blend with all the distributions.

I can investigate what is required, but this will be rather low priority as even the obsolete method works great right now. I respect the need to keep the libraries current so we don't run into any deprication problems in the future though.

@qarkai
Copy link
Author

qarkai commented Oct 29, 2023

dasbus is quite modern, old distros don't have it, but major distros (CentOS, Debian, Fedora, OpenSUSE, Rocky) have packages, see https://repology.org/project/dasbus/versions and https://repology.org/project/python:dasbus/versions.

dasbus itself depends on PyGObject. Probably it makes more sense to use GDBus via PyGObject directly.

@qarkai
Copy link
Author

qarkai commented Nov 5, 2023

I was able to port dbus plugin to Gio/GLib, but not sure how to fix tests. I can create draft PR with my patches.

@caronc
Copy link
Owner

caronc commented Nov 5, 2023

I think it's great that you've got something going. create a PR and i can try to help with the testing.

I feel that the old way should be still available (so your new way should introduce a an alternative, but not a replacement).

I see NotifyDBus.py being moved to /NotifyDBus/v1.py (or something like that), and your code going in NotifyDBus/v2.py with a __init__.py tying the two together and making up the bulk of the old NotifyDBus.py library.

does that make sense? I can help with some of this if you have some working v2 code. ... we'll default a new attribute called version to 2' but still allow people to do version=1 to be backwards compatible.

Perhaps this is overkill too; this will be easier to decide once you share your solution 馃檪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants