[openstack-dev] [oslo][glance][all] Removing deprecated functions from oslo_utils.timeutils

Joshua Harlow harlowja at fastmail.com
Thu Dec 10 06:56:44 UTC 2015


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 ;)

Robert Collins wrote:
> On 10 December 2015 at 18:19, Davanum Srinivas<davanum at gmail.com>  wrote:
>> So clearly the deprecation process is not working as no one looks at
>> the log messages and fix their own projects. Sigh!
>
> I think we need some way to ensure that a deprecation has been done:
> perhaps a job that we can run on each oslo project which fails if
> deprecated things are in use; we can have that on non-voting, and then
> use it to detect the release in which we can start the removal clock
> for a deprecated thing.
>
> -Rob
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list