diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-01-24 16:06:35 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-01-24 16:06:35 +0000 |
commit | b486edf800ecb9d2e23a35f7ac3151657ee39250 (patch) | |
tree | 9eab5d6a70aef38e8f72ae1fc32031f219a627f9 | |
parent | 50fa5eb54992c28d63b0532533f755ff39f082e2 (diff) | |
download | dbus-python-b486edf800ecb9d2e23a35f7ac3151657ee39250.tar.gz |
Deprecate dbus.glib (use dbus.mainloop.glib or dbus.mainloop.qt4)
-rw-r--r-- | dbus/glib.py | 10 |
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) |