Switch from oslo.utils to oslo_utils

oslo_utils moved out of the oslo namespace.

bp drop-namespace-packages

Change-Id: I72e67dc1f649ba137dd06f5ab7133858c6abd67d
This commit is contained in:
Brant Knudson 2015-01-08 17:29:47 -06:00
parent d2fd6c9f71
commit dbb5395620
9 changed files with 45 additions and 6 deletions

View File

@ -17,7 +17,7 @@
import datetime
from oslo.utils import timeutils
from oslo_utils import timeutils
from keystoneclient.i18n import _
from keystoneclient import service_catalog

View File

@ -12,7 +12,7 @@
import datetime
from oslo.utils import timeutils
from oslo_utils import timeutils
from keystoneclient import utils

View File

@ -13,7 +13,7 @@
import datetime
import uuid
from oslo.utils import timeutils
from oslo_utils import timeutils
from keystoneclient.fixture import exception

View File

@ -13,7 +13,7 @@
import datetime
import uuid
from oslo.utils import timeutils
from oslo_utils import timeutils
from keystoneclient.fixture import exception

View File

View File

@ -0,0 +1,38 @@
# 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.
"""python-keystoneclient's pep8 extensions.
In order to make the review process faster and easier for core devs we are
adding some python-keystoneclient specific pep8 checks. This will catch common
errors so that core devs don't have to.
"""
import re
def check_oslo_namespace_imports(logical_line, blank_before, filename):
oslo_namespace_imports = re.compile(
r"(((from)|(import))\s+oslo\.utils)|"
"(from\s+oslo\s+import\s+utils)")
if re.match(oslo_namespace_imports, logical_line):
msg = ("K333: '%s' must be used instead of '%s'.") % (
logical_line.replace('oslo.', 'oslo_'),
logical_line)
yield(0, msg)
def factory(register):
register(check_oslo_namespace_imports)

View File

@ -19,7 +19,7 @@ import time
from oslo.config import cfg
from oslo.serialization import jsonutils
from oslo.utils import importutils
from oslo_utils import importutils
import requests
import six
from six.moves import urllib

View File

@ -17,7 +17,7 @@ import inspect
import logging
import sys
from oslo.utils import encodeutils
from oslo_utils import encodeutils
import prettytable
import six

View File

@ -46,3 +46,4 @@ commands=
[hacking]
import_exceptions =
keystoneclient.i18n
local-check-factory = keystoneclient.hacking.checks.factory