Change oslo.serialization to oslo_serialization
The oslo libraries are moving away from namespace packages. A hacking check is added to enforce use of the new location. bp drop-namespace-packages Change-Id: I76dc9f733b222144f0274f8854877587c3501d1e
This commit is contained in:
parent
aa613dfb0d
commit
2b8d378563
@ -15,7 +15,7 @@
|
||||
import sys
|
||||
|
||||
from keystoneclient.common import cms
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import importutils
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
import functools
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from pycadf import cadftaxonomy as taxonomy
|
||||
from six.moves.urllib import parse
|
||||
|
||||
|
@ -26,7 +26,7 @@ from oslo.db import exception as db_exception
|
||||
from oslo.db import options as db_options
|
||||
from oslo.db.sqlalchemy import models
|
||||
from oslo.db.sqlalchemy import session as db_session
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
import sqlalchemy as sql
|
||||
from sqlalchemy.ext import declarative
|
||||
|
@ -28,7 +28,7 @@ column.
|
||||
|
||||
"""
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import strutils
|
||||
import sqlalchemy as sql
|
||||
from sqlalchemy.orm import Session
|
||||
|
@ -28,7 +28,7 @@ column.
|
||||
|
||||
"""
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import strutils
|
||||
import sqlalchemy as sql
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
@ -20,7 +20,7 @@ import sys
|
||||
import migrate
|
||||
from migrate import exceptions
|
||||
from oslo.db.sqlalchemy import migration
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import importutils
|
||||
import six
|
||||
import sqlalchemy
|
||||
|
@ -23,7 +23,7 @@ import hashlib
|
||||
import os
|
||||
import pwd
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import strutils
|
||||
import passlib.hash
|
||||
import six
|
||||
|
@ -21,7 +21,7 @@
|
||||
import copy
|
||||
|
||||
from oslo import i18n
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import importutils
|
||||
from oslo_utils import strutils
|
||||
import routes.middleware
|
||||
|
@ -37,7 +37,7 @@ import sys
|
||||
import uuid
|
||||
|
||||
from keystoneclient.contrib.ec2 import utils as ec2_utils
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
|
||||
from keystone.common import controller
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from keystone.common import sql
|
||||
from keystone.contrib.federation import core
|
||||
|
@ -16,7 +16,7 @@ import datetime
|
||||
import random
|
||||
import uuid
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
"""Extensions supporting OAuth1."""
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import timeutils
|
||||
|
||||
from keystone.common import controller
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
import webob
|
||||
|
||||
from keystone.common import extension
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
import hashlib
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from keystone.common import controller
|
||||
from keystone.common import dependency
|
||||
|
@ -399,8 +399,8 @@ class CheckForLoggingIssues(BaseASTChecker):
|
||||
|
||||
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)")
|
||||
r"(((from)|(import))\s+oslo\.((serialization)|(utils)))|"
|
||||
"(from\s+oslo\s+import\s+((serialization)|(utils)))")
|
||||
|
||||
if re.match(oslo_namespace_imports, logical_line):
|
||||
msg = ("K333: '%s' must be used instead of '%s'.") % (
|
||||
|
@ -12,8 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_middleware import sizelimit
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
|
||||
from keystone.common import authorization
|
||||
|
@ -188,12 +188,24 @@ class HackingCode(fixtures.Fixture):
|
||||
from oslo import utils
|
||||
from oslo.utils import encodeutils
|
||||
from oslo_utils import encodeutils
|
||||
|
||||
import oslo.serialization
|
||||
import oslo_serialization
|
||||
import oslo.serialization.jsonutils
|
||||
import oslo_serialization.jsonutils
|
||||
from oslo import serialization
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
""",
|
||||
'expected_errors': [
|
||||
(1, 0, 'K333'),
|
||||
(3, 0, 'K333'),
|
||||
(5, 0, 'K333'),
|
||||
(6, 0, 'K333'),
|
||||
(9, 0, 'K333'),
|
||||
(11, 0, 'K333'),
|
||||
(13, 0, 'K333'),
|
||||
(14, 0, 'K333'),
|
||||
],
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
import io
|
||||
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
import webtest
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
import uuid
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
|
||||
from keystone.common import wsgi
|
||||
|
@ -18,7 +18,7 @@ import uuid
|
||||
from keystoneclient import exceptions as client_exceptions
|
||||
from keystoneclient.v2_0 import client as ks_client
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import timeutils
|
||||
import webob
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
import datetime
|
||||
import uuid
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
from testtools import matchers
|
||||
|
@ -17,7 +17,7 @@ import uuid
|
||||
|
||||
from lxml import etree
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslotest import mockpatch
|
||||
import saml2
|
||||
from saml2 import saml
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import uuid
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from keystone import config
|
||||
from keystone.policy.backends import rules
|
||||
|
@ -15,7 +15,7 @@
|
||||
import copy
|
||||
import uuid
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from six.moves import urllib
|
||||
|
||||
from keystone import config
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
import uuid
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from keystone import config
|
||||
from keystone import exception
|
||||
|
@ -18,7 +18,7 @@ import functools
|
||||
import random
|
||||
|
||||
import mock
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from testtools import matchers as tt_matchers
|
||||
|
||||
from keystone.common import json_home
|
||||
|
@ -18,7 +18,7 @@ import uuid
|
||||
|
||||
import mock
|
||||
from oslo import i18n
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
from testtools import matchers
|
||||
import webob
|
||||
|
@ -13,7 +13,7 @@
|
||||
import datetime
|
||||
import uuid
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from keystone.common import utils as common_utils
|
||||
from keystone import config
|
||||
|
@ -16,7 +16,7 @@ import datetime
|
||||
import sys
|
||||
|
||||
from keystoneclient.common import cms
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
from oslo_utils import timeutils
|
||||
import six
|
||||
from six.moves.urllib import parse
|
||||
|
@ -15,7 +15,7 @@
|
||||
"""Keystone PKI Token Provider"""
|
||||
|
||||
from keystoneclient.common import cms
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from keystone.common import environment
|
||||
from keystone.common import utils
|
||||
|
@ -13,7 +13,7 @@
|
||||
"""Keystone Compressed PKI Token Provider"""
|
||||
|
||||
from keystoneclient.common import cms
|
||||
from oslo.serialization import jsonutils
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from keystone.common import environment
|
||||
from keystone.common import utils
|
||||
|
Loading…
Reference in New Issue
Block a user