Summary: | Make dbus-python examples compatible with python3 and fix gconf ones | ||
---|---|---|---|
Product: | dbus | Reporter: | Ben Longbons <b.r.longbons> |
Component: | python | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | D-Bus Maintainers <dbus> |
Severity: | enhancement | ||
Priority: | medium | Keywords: | patch |
Version: | git master | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Attachments: |
patch 1/2
patch 2/2 |
Description
Ben Longbons
2014-10-31 22:13:03 UTC
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.