summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-01-24 16:06:35 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2012-01-24 16:06:35 +0000
commitb486edf800ecb9d2e23a35f7ac3151657ee39250 (patch)
tree9eab5d6a70aef38e8f72ae1fc32031f219a627f9
parent50fa5eb54992c28d63b0532533f755ff39f082e2 (diff)
downloaddbus-python-b486edf800ecb9d2e23a35f7ac3151657ee39250.tar.gz
Deprecate dbus.glib (use dbus.mainloop.glib or dbus.mainloop.qt4)
-rw-r--r--dbus/glib.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/dbus/glib.py b/dbus/glib.py
index 610de53..bb6db74 100644
--- a/dbus/glib.py
+++ b/dbus/glib.py
@@ -35,7 +35,17 @@ equivalent code::
__docformat__ = 'restructuredtext'
from dbus.mainloop.glib import DBusGMainLoop, threads_init
+from warnings import warn as _warn
init_threads = threads_init
DBusGMainLoop(set_as_default=True)
+
+_warn(DeprecationWarning("""\
+Importing dbus.glib to use the GLib main loop with dbus-python is deprecated.
+Instead, use this sequence:
+
+ from dbus.mainloop.glib import DBusGMainLoop
+
+ DBusGMainLoop(set_as_default=True)
+"""), DeprecationWarning, stacklevel=2)