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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dbus python dependency to latest #2744

Closed
phillxnet opened this issue Nov 14, 2023 · 3 comments
Closed

Update dbus python dependency to latest #2744

phillxnet opened this issue Nov 14, 2023 · 3 comments
Assignees
Milestone

Comments

@phillxnet
Copy link
Member

Our dbus-python dependency was previously constrained by our python version. This is not longer the case. We currently have:

dbus-python = "==1.2.18"

It is proposed, in the interests for issues such as

"Avoid system calls to interact with systemd services" #2680 where we have:

A better approach would most likely be to directly interact with systemd DBus. While we already have the dbus library as a dependency for interacting with the SSSD DBus responder InfoPipe, there is a python library to simplify interacting with systemd units and services: pystemd

While the linked issue, and proposed systemd dbus library, does not currently depend on dbus-python; it would never-the-less be advisable to unpin this library to enable our ongoing Python updates.

PyPi: https://pypi.org/project/dbus-python/
Project source: https://gitlab.freedesktop.org/dbus/dbus-python/
Project docs: https://dbus.freedesktop.org/doc/dbus-python/
Release history: https://dbus.freedesktop.org/doc/dbus-python/news.html#release-history

@phillxnet phillxnet changed the title Update dubs python dependency to latest Update dbus python dependency to latest Nov 14, 2023
@phillxnet phillxnet self-assigned this Nov 14, 2023
@phillxnet
Copy link
Member Author

phillxnet commented Nov 14, 2023

Removing our pinning give the following 'poetry update' result:

lbuildvm:/opt/rockstor # poetry update
Updating dependencies
Resolving dependencies... (7.8s)

Writing lock file

Package operations: 0 installs, 1 update, 0 removals

  • Updating dbus-python (1.2.18 -> 1.3.2)

Testing:

lbuildvm:/opt/rockstor/src/rockstor # export DJANGO_SETTINGS_MODULE=settings
lbuildvm:/opt/rockstor/src/rockstor # poetry run django-admin test -v 2
...
----------------------------------------------------------------------
Ran 278 tests in 30.095s

OK

@phillxnet
Copy link
Member Author

phillxnet commented Nov 14, 2023

@FroggyFlox & @Hooverdan96 I've just found the following upstream comment: https://gitlab.freedesktop.org/dbus/dbus-python/-/issues/48#note_2045548 from two months ago, as of this comment.

This project is only semi-maintained: merge requests welcome, but I am unlikely to be able to spend enough time on this to rewrite the tutorial.

As such we should look to limiting our use of this library, & ideally removing it in time.

I think users.py is currenlty the only user:

lbuildvm:/opt/rockstor/src # grep -R "import dbus"
rockstor/system/users.py:import dbus

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Nov 14, 2023
Remove explicit pinning of dbus-python, enabling:
1.2.18 to 1.3.2 update as per poetry.lock.
phillxnet added a commit that referenced this issue Nov 14, 2023
…dency-to-latest

Update dbus python dependency to latest #2744
@phillxnet
Copy link
Member Author

Closing as:
Fixed by #2745

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

No branches or pull requests

1 participant