diff --git a/taskflow/atom.py b/taskflow/atom.py index 3131664f..a2066048 100644 --- a/taskflow/atom.py +++ b/taskflow/atom.py @@ -15,7 +15,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.utils import reflection +from oslo_utils import reflection import six from taskflow import exceptions diff --git a/taskflow/engines/action_engine/engine.py b/taskflow/engines/action_engine/engine.py index 157f641d..ed06b64f 100644 --- a/taskflow/engines/action_engine/engine.py +++ b/taskflow/engines/action_engine/engine.py @@ -19,7 +19,7 @@ import contextlib import threading from concurrent import futures -from oslo.utils import excutils +from oslo_utils import excutils import six from taskflow.engines.action_engine import compiler diff --git a/taskflow/engines/action_engine/executor.py b/taskflow/engines/action_engine/executor.py index 1c925678..7f6c3ff6 100644 --- a/taskflow/engines/action_engine/executor.py +++ b/taskflow/engines/action_engine/executor.py @@ -20,10 +20,10 @@ from multiprocessing import managers import os import pickle -from oslo.utils import excutils -from oslo.utils import reflection -from oslo.utils import timeutils -from oslo.utils import uuidutils +from oslo_utils import excutils +from oslo_utils import reflection +from oslo_utils import timeutils +from oslo_utils import uuidutils import six from six.moves import queue as compat_queue diff --git a/taskflow/engines/helpers.py b/taskflow/engines/helpers.py index 2c84a3c3..3d8ccf55 100644 --- a/taskflow/engines/helpers.py +++ b/taskflow/engines/helpers.py @@ -18,8 +18,8 @@ import contextlib import itertools import traceback -from oslo.utils import importutils -from oslo.utils import reflection +from oslo_utils import importutils +from oslo_utils import reflection import six import stevedore.driver diff --git a/taskflow/engines/worker_based/endpoint.py b/taskflow/engines/worker_based/endpoint.py index 0f883ade..2c85310e 100644 --- a/taskflow/engines/worker_based/endpoint.py +++ b/taskflow/engines/worker_based/endpoint.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.utils import reflection +from oslo_utils import reflection from taskflow.engines.action_engine import executor diff --git a/taskflow/engines/worker_based/executor.py b/taskflow/engines/worker_based/executor.py index aea63cfc..b07c73f8 100644 --- a/taskflow/engines/worker_based/executor.py +++ b/taskflow/engines/worker_based/executor.py @@ -17,8 +17,8 @@ import functools import threading -from oslo.utils import reflection -from oslo.utils import timeutils +from oslo_utils import reflection +from oslo_utils import timeutils from taskflow.engines.action_engine import executor from taskflow.engines.worker_based import cache diff --git a/taskflow/engines/worker_based/protocol.py b/taskflow/engines/worker_based/protocol.py index 96ba84c4..19813d40 100644 --- a/taskflow/engines/worker_based/protocol.py +++ b/taskflow/engines/worker_based/protocol.py @@ -20,8 +20,8 @@ import threading from concurrent import futures import jsonschema from jsonschema import exceptions as schema_exc -from oslo.utils import reflection -from oslo.utils import timeutils +from oslo_utils import reflection +from oslo_utils import timeutils import six from taskflow.engines.action_engine import executor diff --git a/taskflow/engines/worker_based/worker.py b/taskflow/engines/worker_based/worker.py index 5464c814..98e690ef 100644 --- a/taskflow/engines/worker_based/worker.py +++ b/taskflow/engines/worker_based/worker.py @@ -21,7 +21,7 @@ import string import sys from concurrent import futures -from oslo.utils import reflection +from oslo_utils import reflection from taskflow.engines.worker_based import endpoint from taskflow.engines.worker_based import server diff --git a/taskflow/examples/create_parallel_volume.py b/taskflow/examples/create_parallel_volume.py index 0416a25e..c23bf342 100644 --- a/taskflow/examples/create_parallel_volume.py +++ b/taskflow/examples/create_parallel_volume.py @@ -28,7 +28,7 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) sys.path.insert(0, top_dir) -from oslo.utils import reflection +from oslo_utils import reflection from taskflow import engines from taskflow.listeners import printing diff --git a/taskflow/examples/fake_billing.py b/taskflow/examples/fake_billing.py index 0fbe81f7..8e0c181e 100644 --- a/taskflow/examples/fake_billing.py +++ b/taskflow/examples/fake_billing.py @@ -27,7 +27,7 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) sys.path.insert(0, top_dir) -from oslo.utils import uuidutils +from oslo_utils import uuidutils from taskflow import engines from taskflow.listeners import printing diff --git a/taskflow/examples/resume_vm_boot.py b/taskflow/examples/resume_vm_boot.py index f400d0d1..9c119fc2 100644 --- a/taskflow/examples/resume_vm_boot.py +++ b/taskflow/examples/resume_vm_boot.py @@ -31,7 +31,7 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), sys.path.insert(0, top_dir) sys.path.insert(0, self_dir) -from oslo.utils import uuidutils +from oslo_utils import uuidutils from taskflow import engines from taskflow import exceptions as exc diff --git a/taskflow/flow.py b/taskflow/flow.py index 683cf8b4..cd70e7c9 100644 --- a/taskflow/flow.py +++ b/taskflow/flow.py @@ -16,7 +16,7 @@ import abc -from oslo.utils import reflection +from oslo_utils import reflection import six # Link metadata keys that have inherent/special meaning. diff --git a/taskflow/jobs/backends/impl_zookeeper.py b/taskflow/jobs/backends/impl_zookeeper.py index 65f88902..186be8e6 100644 --- a/taskflow/jobs/backends/impl_zookeeper.py +++ b/taskflow/jobs/backends/impl_zookeeper.py @@ -24,8 +24,8 @@ from kazoo import exceptions as k_exceptions from kazoo.protocol import paths as k_paths from kazoo.recipe import watchers from oslo.serialization import jsonutils -from oslo.utils import excutils -from oslo.utils import uuidutils +from oslo_utils import excutils +from oslo_utils import uuidutils import six from taskflow import exceptions as excp diff --git a/taskflow/jobs/job.py b/taskflow/jobs/job.py index 23e33ee7..a7dd04f7 100644 --- a/taskflow/jobs/job.py +++ b/taskflow/jobs/job.py @@ -17,7 +17,7 @@ import abc -from oslo.utils import uuidutils +from oslo_utils import uuidutils import six diff --git a/taskflow/listeners/base.py b/taskflow/listeners/base.py index 42dc87e9..182a7ddb 100644 --- a/taskflow/listeners/base.py +++ b/taskflow/listeners/base.py @@ -18,7 +18,7 @@ from __future__ import absolute_import import abc -from oslo.utils import excutils +from oslo_utils import excutils import six from taskflow import logging diff --git a/taskflow/persistence/backends/impl_sqlalchemy.py b/taskflow/persistence/backends/impl_sqlalchemy.py index c65c9134..d84b9b27 100644 --- a/taskflow/persistence/backends/impl_sqlalchemy.py +++ b/taskflow/persistence/backends/impl_sqlalchemy.py @@ -24,7 +24,7 @@ import copy import functools import time -from oslo.utils import strutils +from oslo_utils import strutils import six import sqlalchemy as sa from sqlalchemy import exc as sa_exc diff --git a/taskflow/persistence/backends/sqlalchemy/models.py b/taskflow/persistence/backends/sqlalchemy/models.py index 3f056de5..e6a55768 100644 --- a/taskflow/persistence/backends/sqlalchemy/models.py +++ b/taskflow/persistence/backends/sqlalchemy/models.py @@ -16,8 +16,8 @@ # under the License. from oslo.serialization import jsonutils -from oslo.utils import timeutils -from oslo.utils import uuidutils +from oslo_utils import timeutils +from oslo_utils import uuidutils from sqlalchemy import Column, String, DateTime, Enum from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import ForeignKey diff --git a/taskflow/persistence/logbook.py b/taskflow/persistence/logbook.py index 284fbf66..9ef3efec 100644 --- a/taskflow/persistence/logbook.py +++ b/taskflow/persistence/logbook.py @@ -18,8 +18,8 @@ import abc import copy -from oslo.utils import timeutils -from oslo.utils import uuidutils +from oslo_utils import timeutils +from oslo_utils import uuidutils import six from taskflow import exceptions as exc diff --git a/taskflow/storage.py b/taskflow/storage.py index e698ca4d..8cb81f3b 100644 --- a/taskflow/storage.py +++ b/taskflow/storage.py @@ -17,8 +17,8 @@ import abc import contextlib -from oslo.utils import reflection -from oslo.utils import uuidutils +from oslo_utils import reflection +from oslo_utils import uuidutils import six from taskflow import exceptions diff --git a/taskflow/task.py b/taskflow/task.py index 7a1c7180..8fa9ffb5 100644 --- a/taskflow/task.py +++ b/taskflow/task.py @@ -18,7 +18,7 @@ import abc import copy -from oslo.utils import reflection +from oslo_utils import reflection import six from taskflow import atom diff --git a/taskflow/tests/unit/jobs/base.py b/taskflow/tests/unit/jobs/base.py index 4c070f31..8a8bee22 100644 --- a/taskflow/tests/unit/jobs/base.py +++ b/taskflow/tests/unit/jobs/base.py @@ -18,7 +18,7 @@ import contextlib import time from kazoo.recipe import watchers -from oslo.utils import uuidutils +from oslo_utils import uuidutils from taskflow import exceptions as excp from taskflow.persistence.backends import impl_dir diff --git a/taskflow/tests/unit/jobs/test_zk_job.py b/taskflow/tests/unit/jobs/test_zk_job.py index 8737a4f5..8b52db6a 100644 --- a/taskflow/tests/unit/jobs/test_zk_job.py +++ b/taskflow/tests/unit/jobs/test_zk_job.py @@ -15,7 +15,7 @@ # under the License. from oslo.serialization import jsonutils -from oslo.utils import uuidutils +from oslo_utils import uuidutils import six import testtools from zake import fake_client diff --git a/taskflow/tests/unit/persistence/base.py b/taskflow/tests/unit/persistence/base.py index 88660fd5..184cf51e 100644 --- a/taskflow/tests/unit/persistence/base.py +++ b/taskflow/tests/unit/persistence/base.py @@ -16,7 +16,7 @@ import contextlib -from oslo.utils import uuidutils +from oslo_utils import uuidutils from taskflow import exceptions as exc from taskflow.persistence import logbook diff --git a/taskflow/tests/unit/persistence/test_zk_persistence.py b/taskflow/tests/unit/persistence/test_zk_persistence.py index 28463bb7..bb8bec9a 100644 --- a/taskflow/tests/unit/persistence/test_zk_persistence.py +++ b/taskflow/tests/unit/persistence/test_zk_persistence.py @@ -17,7 +17,7 @@ import contextlib from kazoo import exceptions as kazoo_exceptions -from oslo.utils import uuidutils +from oslo_utils import uuidutils import testtools from zake import fake_client diff --git a/taskflow/tests/unit/test_engine_helpers.py b/taskflow/tests/unit/test_engine_helpers.py index 4087d839..ed40caa0 100644 --- a/taskflow/tests/unit/test_engine_helpers.py +++ b/taskflow/tests/unit/test_engine_helpers.py @@ -81,7 +81,7 @@ class FlowFromDetailTestCase(test.TestCase): _lb, flow_detail = p_utils.temporary_flow_detail() flow_detail.meta = dict(factory=dict(name=name)) - with mock.patch('oslo.utils.importutils.import_class', + with mock.patch('oslo_utils.importutils.import_class', return_value=lambda: 'RESULT') as mock_import: result = taskflow.engines.flow_from_detail(flow_detail) mock_import.assert_called_onec_with(name) @@ -92,7 +92,7 @@ class FlowFromDetailTestCase(test.TestCase): _lb, flow_detail = p_utils.temporary_flow_detail() flow_detail.meta = dict(factory=dict(name=name, args=['foo'])) - with mock.patch('oslo.utils.importutils.import_class', + with mock.patch('oslo_utils.importutils.import_class', return_value=lambda x: 'RESULT %s' % x) as mock_import: result = taskflow.engines.flow_from_detail(flow_detail) mock_import.assert_called_onec_with(name) diff --git a/taskflow/tests/unit/test_listeners.py b/taskflow/tests/unit/test_listeners.py index c10bc282..625b9a1f 100644 --- a/taskflow/tests/unit/test_listeners.py +++ b/taskflow/tests/unit/test_listeners.py @@ -19,7 +19,7 @@ import logging import time from oslo.serialization import jsonutils -from oslo.utils import reflection +from oslo_utils import reflection import six from zake import fake_client diff --git a/taskflow/tests/unit/test_storage.py b/taskflow/tests/unit/test_storage.py index 886e075a..5f521afb 100644 --- a/taskflow/tests/unit/test_storage.py +++ b/taskflow/tests/unit/test_storage.py @@ -17,7 +17,7 @@ import contextlib import threading -from oslo.utils import uuidutils +from oslo_utils import uuidutils from taskflow import exceptions from taskflow.persistence import backends diff --git a/taskflow/tests/unit/test_types.py b/taskflow/tests/unit/test_types.py index 85d6e557..8aae36fa 100644 --- a/taskflow/tests/unit/test_types.py +++ b/taskflow/tests/unit/test_types.py @@ -15,7 +15,7 @@ # under the License. import networkx as nx -from oslo.utils import timeutils +from oslo_utils import timeutils import six from taskflow import exceptions as excp diff --git a/taskflow/tests/unit/worker_based/test_endpoint.py b/taskflow/tests/unit/worker_based/test_endpoint.py index 53260b12..6f13c8be 100644 --- a/taskflow/tests/unit/worker_based/test_endpoint.py +++ b/taskflow/tests/unit/worker_based/test_endpoint.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.utils import reflection +from oslo_utils import reflection from taskflow.engines.worker_based import endpoint as ep from taskflow import task diff --git a/taskflow/tests/unit/worker_based/test_executor.py b/taskflow/tests/unit/worker_based/test_executor.py index f075e2f8..4e0c38bc 100644 --- a/taskflow/tests/unit/worker_based/test_executor.py +++ b/taskflow/tests/unit/worker_based/test_executor.py @@ -17,7 +17,7 @@ import time from concurrent import futures -from oslo.utils import timeutils +from oslo_utils import timeutils from taskflow.engines.worker_based import executor from taskflow.engines.worker_based import protocol as pr diff --git a/taskflow/tests/unit/worker_based/test_message_pump.py b/taskflow/tests/unit/worker_based/test_message_pump.py index 7b945a26..d8438131 100644 --- a/taskflow/tests/unit/worker_based/test_message_pump.py +++ b/taskflow/tests/unit/worker_based/test_message_pump.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.utils import uuidutils +from oslo_utils import uuidutils from taskflow.engines.worker_based import protocol as pr from taskflow.engines.worker_based import proxy diff --git a/taskflow/tests/unit/worker_based/test_pipeline.py b/taskflow/tests/unit/worker_based/test_pipeline.py index 53bf8f9b..8d4de7f5 100644 --- a/taskflow/tests/unit/worker_based/test_pipeline.py +++ b/taskflow/tests/unit/worker_based/test_pipeline.py @@ -15,7 +15,7 @@ # under the License. from concurrent import futures -from oslo.utils import uuidutils +from oslo_utils import uuidutils from taskflow.engines.action_engine import executor as base_executor from taskflow.engines.worker_based import endpoint diff --git a/taskflow/tests/unit/worker_based/test_protocol.py b/taskflow/tests/unit/worker_based/test_protocol.py index 4c34ed60..5356fb99 100644 --- a/taskflow/tests/unit/worker_based/test_protocol.py +++ b/taskflow/tests/unit/worker_based/test_protocol.py @@ -15,8 +15,8 @@ # under the License. from concurrent import futures -from oslo.utils import timeutils -from oslo.utils import uuidutils +from oslo_utils import timeutils +from oslo_utils import uuidutils from taskflow.engines.action_engine import executor from taskflow.engines.worker_based import protocol as pr diff --git a/taskflow/tests/unit/worker_based/test_worker.py b/taskflow/tests/unit/worker_based/test_worker.py index 8fc76eb4..4bf86529 100644 --- a/taskflow/tests/unit/worker_based/test_worker.py +++ b/taskflow/tests/unit/worker_based/test_worker.py @@ -14,7 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.utils import reflection +from oslo_utils import reflection import six from taskflow.engines.worker_based import endpoint diff --git a/taskflow/types/cache.py b/taskflow/types/cache.py index c3ac7a18..d9b14910 100644 --- a/taskflow/types/cache.py +++ b/taskflow/types/cache.py @@ -16,7 +16,7 @@ import threading -from oslo.utils import reflection +from oslo_utils import reflection import six diff --git a/taskflow/types/failure.py b/taskflow/types/failure.py index ae848d31..4732fb14 100644 --- a/taskflow/types/failure.py +++ b/taskflow/types/failure.py @@ -19,7 +19,7 @@ import os import sys import traceback -from oslo.utils import reflection +from oslo_utils import reflection import six from taskflow import exceptions as exc diff --git a/taskflow/types/notifier.py b/taskflow/types/notifier.py index 838585a2..9f4df801 100644 --- a/taskflow/types/notifier.py +++ b/taskflow/types/notifier.py @@ -19,7 +19,7 @@ import contextlib import copy import logging -from oslo.utils import reflection +from oslo_utils import reflection import six LOG = logging.getLogger(__name__) diff --git a/taskflow/types/timing.py b/taskflow/types/timing.py index ab1d39dd..e7fa7d45 100644 --- a/taskflow/types/timing.py +++ b/taskflow/types/timing.py @@ -14,8 +14,8 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo.utils import reflection -from oslo.utils import timeutils +from oslo_utils import reflection +from oslo_utils import timeutils from taskflow.utils import threading_utils diff --git a/taskflow/utils/deprecation.py b/taskflow/utils/deprecation.py index 5c466662..60f82d6f 100644 --- a/taskflow/utils/deprecation.py +++ b/taskflow/utils/deprecation.py @@ -17,7 +17,7 @@ import functools import warnings -from oslo.utils import reflection +from oslo_utils import reflection import six _CLASS_MOVED_PREFIX_TPL = "Class '%s' has moved to '%s'" diff --git a/taskflow/utils/kazoo_utils.py b/taskflow/utils/kazoo_utils.py index ab449635..35fe058e 100644 --- a/taskflow/utils/kazoo_utils.py +++ b/taskflow/utils/kazoo_utils.py @@ -16,7 +16,7 @@ from kazoo import client from kazoo import exceptions as k_exc -from oslo.utils import reflection +from oslo_utils import reflection import six from six.moves import zip as compat_zip diff --git a/taskflow/utils/misc.py b/taskflow/utils/misc.py index 5aa62fd9..04150003 100644 --- a/taskflow/utils/misc.py +++ b/taskflow/utils/misc.py @@ -26,9 +26,9 @@ import threading import types from oslo.serialization import jsonutils -from oslo.utils import importutils -from oslo.utils import netutils -from oslo.utils import reflection +from oslo_utils import importutils +from oslo_utils import netutils +from oslo_utils import reflection import six from six.moves import map as compat_map from six.moves import range as compat_range diff --git a/taskflow/utils/persistence_utils.py b/taskflow/utils/persistence_utils.py index 6d5d1685..dd304bc6 100644 --- a/taskflow/utils/persistence_utils.py +++ b/taskflow/utils/persistence_utils.py @@ -17,8 +17,8 @@ import contextlib import os -from oslo.utils import timeutils -from oslo.utils import uuidutils +from oslo_utils import timeutils +from oslo_utils import uuidutils from taskflow import logging from taskflow.persistence import logbook