Move files out of the namespace package

Move oslo.log to oslo_log. Since this library has not been released, we
do not need to retain the old interface for compatibility.

bp/drop-namespace-packages

Change-Id: Id8e2312a72af171918fa4d40117ec652018a37bf
This commit is contained in:
Doug Hellmann 2014-11-14 13:31:58 -05:00 committed by Davanum Srinivas
parent de9b26781e
commit a5b9c2eccf
27 changed files with 27 additions and 55 deletions

View File

@ -2,6 +2,6 @@
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION
${PYTHON:-python} -m subunit.run discover -t ./ ./oslo_log $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -4,4 +4,4 @@
To use oslo.log in a project::
from oslo import log
import oslo_log

View File

@ -6,4 +6,4 @@ modules=
script = tools/run_cross_tests.sh
# The base module to hold the copy of openstack.common
base=oslo.log
base=oslo_log

View File

@ -1,13 +0,0 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
__import__('pkg_resources').declare_namespace(__name__)

View File

@ -21,7 +21,7 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html .
from oslo import i18n
_translators = i18n.TranslatorFactory(domain='oslo.log')
_translators = i18n.TranslatorFactory(domain='oslo_log')
# The primary translation function using the well-known name "_"
_ = _translators.primary

View File

@ -20,9 +20,9 @@ import traceback
import six
from six import moves
from oslo.log import _local
from oslo.log import context as ctx
from oslo.serialization import jsonutils
from oslo_log import _local
from oslo_log import context as ctx
def _dictify_context(context):

View File

@ -42,11 +42,11 @@ from six import moves
_PY26 = sys.version_info[0:2] == (2, 6)
from oslo.log._i18n import _
from oslo.log import _options
from oslo.log import context as ctx
from oslo.log import formatters
from oslo.log import handlers
from oslo_log._i18n import _
from oslo_log import _options
from oslo_log import context as ctx
from oslo_log import formatters
from oslo_log import handlers
def _get_log_file_path(conf, binary=None):

View File

View File

@ -11,8 +11,8 @@
# under the License.
from oslo.log.fixture import logging as logging_fixture
from oslo.log import log as logging
from oslo_log.fixture import logging as logging_fixture
from oslo_log import log as logging
from oslotest import base as test_base
LOG = logging.getLogger(__name__)

View File

@ -15,7 +15,7 @@
from oslotest import base as test_base
from oslo.log import context
from oslo_log import context
class ContextTest(test_base.BaseTestCase):

View File

@ -11,7 +11,7 @@
# under the License.
import mock
from oslo.log import helpers
from oslo_log import helpers
from oslotest import base as test_base

View File

@ -18,7 +18,7 @@ import threading
from oslotest import base as test_base
from six import moves
from oslo.log import _local
from oslo_log import _local
class Dict(dict):

View File

@ -27,12 +27,12 @@ from oslo.serialization import jsonutils
from oslotest import base as test_base
import six
from oslo.log import _local
from oslo.log import _options
from oslo.log import context
from oslo.log import formatters
from oslo.log import handlers
from oslo.log import log
from oslo_log import _local
from oslo_log import _options
from oslo_log import context
from oslo_log import formatters
from oslo_log import handlers
from oslo_log import log
def _fake_context():

View File

@ -21,16 +21,14 @@ classifier =
[files]
packages =
oslo
namespace_packages =
oslo
oslo_log
[pbr]
warnerrors = true
[entry_points]
oslo.config.opts =
oslo.log = oslo.log._options:list_opts
oslo.log = oslo_log._options:list_opts
[build_sphinx]
source-dir = doc/source
@ -42,10 +40,10 @@ upload-dir = doc/build/html
[compile_catalog]
directory = oslo.log/locale
domain = oslo.log
domain = oslo_log
[update_catalog]
domain = oslo.log
domain = oslo_log
output_dir = oslo.log/locale
input_file = oslo.log/locale/oslo.log.pot

View File

@ -1,13 +0,0 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

View File

@ -38,4 +38,4 @@ ignore = E123,E125,H305,H307,H405,H803,H904
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,__init__.py
[hacking]
import_exceptions = oslo.log._i18n
import_exceptions = oslo_log._i18n