Created attachment 108744 [details] [review] patch 1/2 The attached 2 patches update the examples to be compatible with python3 (as well as python2), and fixes the gconf examples (including executable bits and installation). Note that gconf examples require an additional package besides dbus-python itself; on Debian it is called `gir1.2-gconf-2.0`. You can also merge them with the following command: git pull git://github.com/o11c/dbus-python.git py3-examples Or browse at https://github.com/o11c/dbus-python/tree/py3-examples
Created attachment 108745 [details] [review] patch 2/2
Comment on attachment 108744 [details] [review] patch 1/2 Review of attachment 108744 [details] [review]: ----------------------------------------------------------------- ::: examples/gconf-proxy-client.py @@ +28,4 @@ > gconf_key = "/desktop/gnome/file_views/icon_theme" > > bus = dbus.SessionBus() > +gconf_key_object = dbus.Interface(bus.get_object("org.gnome.GConf.Example", "/org/gnome/GConf" + gconf_key), "org.gnome.GConf") Is this example even desirable? GConf is fairly heavily deprecated. On the other hand, so is dbus-glib, and we use that, so... ::: examples/gconf-proxy-service2.py @@ +34,2 @@ > > +# there is a real service called "org.gnome.GConf"; don't collide with it. Amusingly, when this example was written, it was a proxy from GConf (which didn't use D-Bus at the time) to D-Bus. Now that GConf does use D-Bus, the implementation is "do nothing, it is already on D-Bus" :-P
Comment on attachment 108745 [details] [review] patch 2/2 Review of attachment 108745 [details] [review]: ----------------------------------------------------------------- Yes this all looks reasonable. ::: examples/example-async-client.py @@ +1,3 @@ > #!/usr/bin/env python > > +from __future__ import print_function I was concerned that this might bump dbus-python's Python dependency, but we already require 2.6.
> Is this example even desirable? GConf is fairly heavily deprecated. To me the important thing is demonstrating the use FallbackObject, which is poorly documented otherwise.
Fixed in git master for 1.2.1 (or whatever I end up calling it). Thanks for your patches! I split 1/2 up a bit, since it included some not-so-related changes, including one that touches the actual implementation (not just tests). (In reply to Ben Longbons from comment #4) > > Is this example even desirable? GConf is fairly heavily deprecated. > > To me the important thing is demonstrating the use FallbackObject, which is > poorly documented otherwise. I added a comment about that.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.