diff options
author | Martin Pitt <martinpitt@gnome.org> | 2012-10-26 10:39:28 +0200 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2012-10-26 10:39:28 +0200 |
commit | f976d05b04f26e733d19988e68989e340eb3a29e (patch) | |
tree | a0ca638ae47d9b2e95be4206f98c89d80468412d /gi/__init__.py | |
parent | 366f5d2d3902c6293d0031e0b7dc5d6641a05ac7 (diff) | |
download | pygobject-f976d05b04f26e733d19988e68989e340eb3a29e.tar.gz |
Use a custom deprecation warning to make them visible by default
DeprecationWarning is not shown by default, and is thus rather useless for
developers. Use a custom PyGIDeprecationWarning class and derive it from
RuntimeWarning to make it visible.
Diffstat (limited to 'gi/__init__.py')
-rw-r--r-- | gi/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gi/__init__.py b/gi/__init__.py index 6ebff8e4..d4cdcaa8 100644 --- a/gi/__init__.py +++ b/gi/__init__.py @@ -81,3 +81,8 @@ def require_version(namespace, version): def get_required_version(namespace): return _versions.get(namespace, None) + +# note, DeprecationWarning would be more suitable as a base, but this +# unhelpfully isn't shown by default and thus useless +class PyGIDeprecationWarning(RuntimeWarning): + pass |