diff options
author | Johan Dahlin <johan@src.gnome.org> | 2004-07-26 08:44:26 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2004-07-26 08:44:26 +0000 |
commit | d3bde6a13bb323391949f63b4fe6ec512c7ee17b (patch) | |
tree | 03114b363f077a3e645ffba15b1f4e6ee6d43240 /gtk/__init__.py | |
parent | 2f8c7b2cde8eb95973edeeaaab1fd729bd79280a (diff) | |
download | pygtk-d3bde6a13bb323391949f63b4fe6ec512c7ee17b.tar.gz |
Don't hardcode automake-1.7, Fixes #148377
* autogen.sh: Don't hardcode automake-1.7, Fixes #148377
* gtk/__init__.py: Readd _gobject, but warn if it's used
Diffstat (limited to 'gtk/__init__.py')
-rw-r--r-- | gtk/__init__.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gtk/__init__.py b/gtk/__init__.py index 51090433..2bd18f2c 100644 --- a/gtk/__init__.py +++ b/gtk/__init__.py @@ -58,9 +58,19 @@ gdk.INPUT_READ = _gobject.IO_IN | _gobject.IO_HUP | _gobject.IO_ERR gdk.INPUT_WRITE = _gobject.IO_OUT | _gobject.IO_HUP gdk.INPUT_EXCEPTION = _gobject.IO_PRI -del _gobject +# _gobject deprecation +from types import ModuleType as _module +class _GObjectWrapper(_module): + from warnings import warn + warn = staticmethod(warn) + _gobject = _gobject + def __getattr__(self, attr): + self.warn('gtk._gobject is deprecated, use gobject directly instead') + return getattr(self._gobject, attr) +_gobject = _GObjectWrapper('gtk._gobject') +del _GObjectWrapper, _module -# Warnings +# other deprecated symbols class _Deprecated: from warnings import warn warn = staticmethod(warn) @@ -85,6 +95,7 @@ class _Deprecated: self.warn(message, DeprecationWarning) return self.func(*args, **kwargs) + # old names compatibility ... mainloop = _Deprecated(main, 'mainloop') mainquit = _Deprecated(main_quit, 'mainquit') |