Comment 3 for bug 1411674

Revision history for this message
Doug Chivers (doug-chivers) wrote :

The reason this appeared in pecan is because I have debug enabled, which causes deprecation warnings to be shown. This can be demonstrated as follows.

Create a new virtual env and install oslo config:

$ virtualenv oslotest
$ . oslotest/bin/activate
$ pip install oslo.config

Configure python to show deprecation warnings:

$ python
>>> import logging, warnings
>>> from logging import captureWarnings
>>> logging.basicConfig()
>>> captureWarnings(True)
>>> warnings.simplefilter("default", DeprecationWarning)

Test a deprecation warning:

>>> warnings.warn('hello world',DeprecationWarning)
WARNING:py.warnings:__main__:1: DeprecationWarning: hello world

Import oslo.config:

>>> import oslo.config
WARNING:py.warnings:__main__:1: DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_config instead.

This message is from this file: https://github.com/openstack/oslo.config/blob/master/oslo/config/__init__.py