After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696011 - Derive PyGIDeprecationWarning from DeprecationWarning in stable releases
Derive PyGIDeprecationWarning from DeprecationWarning in stable releases
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-03-17 21:00 UTC by Simon Feltman
Modified: 2013-03-18 07:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Change base class of PyGIDeprecationWarning based on minor version (1.48 KB, patch)
2013-03-17 23:01 UTC, Simon Feltman
committed Details | Review

Description Simon Feltman 2013-03-17 21:00:09 UTC
The idea is to derive PyGIDeprecationWarning from RuntimeWarning for unstable and from DeprecationWarning for stable. Since DeprecationWarning is not shown by default, regular users would not be shown deprecation warnings coming from PyGObject in stable releases.
Comment 1 Simon Feltman 2013-03-17 23:01:15 UTC
Created attachment 239080 [details] [review]
Change base class of PyGIDeprecationWarning based on minor version

Use RuntimeWarning as the base class of PyGIDeprecationWarning
for unstable (odd minor version) and use DeprecationWarning for
stable (even minor version). This is so PyGObject deprecations
behave the same as regular Python deprecations in stable releases.
Comment 2 Martin Pitt 2013-03-18 06:48:04 UTC
Comment on attachment 239080 [details] [review]
Change base class of PyGIDeprecationWarning based on minor version

I'm a bit torn here, as many application developers will use the stable releases. But for the sake of conservatism let's do this. Please push, so that it can go into today's 3.7.92 release.
Comment 3 Simon Feltman 2013-03-18 07:58:27 UTC
Attachment 239080 [details] pushed as 669e15c - Change base class of PyGIDeprecationWarning based on minor version