diff options
-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) |