Commit e45c690b by Martin Pitt

Add backwards compatible API for GLib.unix_signal_add_full()

This was renamed to GLib.unix_signal_add() in
http://git.gnome.org/browse/glib/commit/?id=fca30c3e165

Provide a backwards compatible shim with a deprecation message.
parent 00b9ea32
......@@ -837,6 +837,16 @@ def filename_from_utf8(utf8string, len=-1):
__all__.append('filename_from_utf8')
# backwards compatible API for renamed function
if not hasattr(GLib, 'unix_signal_add_full'):
def add_full_compat(*args):
warnings.warn('GLib.unix_signal_add_full() was renamed to GLib.unix_signal_add()',
PyGIDeprecationWarning)
return GLib.unix_signal_add(*args)
GLib.unix_signal_add_full = add_full_compat
# obsolete constants for backwards compatibility
glib_version = (GLib.MAJOR_VERSION, GLib.MINOR_VERSION, GLib.MICRO_VERSION)
__all__.append('glib_version')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment