On 2012-09-18, at 17:17 , Alexandre Fayolle wrote: > Hello, > > I wanted to bring to your attention the proposal I made in > https://bugs.launchpad.net/openobject-server/+bug/1052392 and for which > I proposed an implementation in > https://code.launchpad.net/~c2c/openobject-server/trunk-deprecate-osv_osv > > This is about using python stdlib DeprecationWarning and warnings module > to tag deprecated features, rather than just putting a comment in the > source code where it will likely be missed by most developers.
The problem of this approach is that most developers are no more likely to notice them with these improvements (which I support anyway) considering: 1. OpenERP's launch scripts do not (as far as I know) allow manipulations of the warnings filter (although it might be possible to use the Python interpreter explicitly and the -W flag, I'm not aware of anybody who does that ever, let alone on a regular basis) 2. From Python 2.7 onwards, DeprecationWarning is silenced by default 3. I don't believe there's any support for logging.captureWarnings either, it only exists in Python 2.7 anyway and (I believe) respects the warnings filter which you can't set (as per 1.) With all that, I rather doubt adding deprecation warnings in the code would do anything more than the equivalent comments. _______________________________________________ Mailing list: https://launchpad.net/~openerp-expert-framework Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-expert-framework More help : https://help.launchpad.net/ListHelp

