On 12/10/2015 01:56 AM, Joshua Harlow wrote: > Shouldn't be to hard (although it's probably not on each oslo project, > but on the consumers projects). > > The warnings module can turn warnings into raised exceptions with a > simple command line switch btw... > > For example: > > $ python -Wonce > Python 2.7.6 (default, Jun 22 2015, 17:58:13) > [GCC 4.8.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import warnings >>>> warnings.warn("I am not supposed to be used", DeprecationWarning) > __main__:1: DeprecationWarning: I am not supposed to be used > > $ python -Werror > Python 2.7.6 (default, Jun 22 2015, 17:58:13) > [GCC 4.8.2] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import warnings >>>> warnings.warn("I am not supposed to be used", DeprecationWarning) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > DeprecationWarning: I am not supposed to be used > > https://docs.python.org/2/library/warnings.html#the-warnings-filter > > Turn that CLI switch from off to on and I'm pretty sure usage of > deprecated things will become pretty evident real quick ;)
It needs to be more targetted than that. There is a long standing warning between paste and pkg_resources that would hard stop everyone. But, yes, the idea of being able to run unit tests with fatal deprecations of oslo easily is what I think would be useful. -Sean -- Sean Dague http://dague.net __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev