LEW21 / pydbus

Pythonic DBus library
GNU Lesser General Public License v2.1
331 stars 75 forks source link

GLib 2.46 is currently required, can we target 2.40.2? #20

Closed hh closed 8 years ago

hh commented 8 years ago

Along the lines of #4 GLib is something very hard to upgrade and you are usually stuck with what is on the system. 2.46 is fairly recent (less than a year?):

https://en.wikipedia.org/wiki/GLib#Releases https://download.gnome.org/sources/glib/2.46/

Is there something we could look into to bringing the requiement down to what is available on common stable systems? Maybe the specific method calls in 2.46?

https://developer.gnome.org/glib/2.46/api-index-2-46.html

Debian Stable is at 2.42:

https://www.debian.org/releases/stable/ https://www.debian.org/releases/jessie/ https://packages.debian.org/jessie/libglib2.0-0

Ubuntu LTS Releases doen't have it until Xenial/16.04, the previous stable is at 2.40.2:

https://wiki.ubuntu.com/Releases https://launchpad.net/ubuntu/%2Bsource/glib2.0

12.04 LTS until April 2017 is at 2.32.4 https://launchpad.net/ubuntu/precise/+source/glib2.0 14.04 LTS until April 2019 is at 2.40.2 https://launchpad.net/ubuntu/trusty/+source/glib2.0

Redhat and Centos are probably pretty far back as well.

LEW21 commented 8 years ago

No, it's unfortunately impossible. 2.46 contains a patch - https://bugzilla.gnome.org/show_bug.cgi?id=656325 - that makes publishing objects possible.

hh commented 8 years ago

Is there a way to detect the version of GLib at runtime to offer appropriate an error message? Might prove useful to those who haven't pinned to 0.3.0 and hit this upgrade.

LEW21 commented 8 years ago

0.3.0 does not support publishing objects at all, so this error can happen only for people using 0.5's features.

I guess I can catch the TypeError and raise my own exception about the GLib version instead.

LEW21 commented 8 years ago

Error message added in https://github.com/LEW21/pydbus/commit/36fd03ee98a9b0b9502f8fced6de1ae40360fddc.

pankit commented 7 years ago

@LEW21 : Could you tell me how I can check the GLib version used? I installed GLib 2.46.

Actually I installed glib2-2.46 and still see the same issue. Can you tell me what I may be doing wrong? I have the below list of RPm's installed.

glib2-2.42.2-5.el7.x86_64 glibmm24-2.42.0-1.el7.x86_64 libappstream-glib-0.3.6-1.el7.x86_64 compat-glibc-headers-2.12-4.el7.centos.x86_64 dbus-glib-0.100-7.el7.x86_64 PackageKit-glib-1.0.7-5.el7.centos.x86_64 glib-networking-2.42.0-1.el7.x86_64 glibc-headers-2.17-106.el7_2.6.x86_64 glibc-2.17-106.el7_2.6.x86_64 avahi-glib-0.6.31-15.el7_2.1.x86_64 compat-libpackagekit-glib2-16-0.8.9-1.el7.x86_64 spice-glib-0.26-5.el7.x86_64 geocode-glib-3.14.0-2.el7.x86_64 ModemManager-glib-1.1.0-8.git20130913.el7.x86_64 glibc-devel-2.17-106.el7_2.6.x86_64 glibc-common-2.17-106.el7_2.6.x86_64 poppler-glib-0.26.5-5.el7.x86_64 compat-glibc-2.12-4.el7.centos.x86_64 glib2-devel-2.42.2-5.el7.x86_64 taglib-1.8-7.20130218git.el7.x86_64 libvirt-glib-0.1.9-1.el7.x86_64 glib2-2.46.2-2.fc23.x86_64

troolee commented 7 years ago

Hi @LEW21

Same here... Trying to use pydbus for bluez on rpi3. Upgraded glib from backports to 2.48. Having the same error.