Use python3 print, division, import

Purpose: To prevent future divergence of py2 and py3 behavior
Note: Changes automatically generated by modernize tool then
manually reviewed.

Partially implements blueprint: support-python3

Change-Id: I88927a174e35efb8371896f4deb8d3e1158aac18
This commit is contained in:
Eric K
2016-01-04 14:00:49 -08:00
parent f23d29daaf
commit 511ee39152
147 changed files with 610 additions and 0 deletions

View File

@@ -11,6 +11,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import gettext
import pbr.version

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from congress.api import webservice
from congress.dse import deepsix
from congress import exception

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.api import webservice

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import traceback
from oslo_log import log as logging

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import json
from oslo_log import log as logging

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
try:
# For Python 3
import http.client as httplib

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import json
import re

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from congress.api import versions
from congress.api import webservice

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.api import api_utils

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.api import error_codes

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.api import api_utils

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.api import api_utils

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.api import api_utils

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.api import api_utils

View File

@@ -13,6 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import copy
import json
import os

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
try:
# For Python 3
import http.client as httplib

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_config import cfg
from oslo_log import log as logging
from oslo_middleware import request_id

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import os
from oslo_config import cfg

View File

@@ -16,6 +16,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import errno
import re
import socket

View File

@@ -14,6 +14,9 @@
# under the License.
"""Policy Engine For Auth on API calls."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_config import cfg
from oslo_policy import policy

View File

@@ -18,6 +18,8 @@
"""Utility methods for working with WSGI servers."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import sys

View File

@@ -14,6 +14,9 @@
# under the License.
"""RequestContext: context for requests that persist through congress."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import copy
import datetime

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
# TODO(thinrichs): move algorithms from compile.py that do analysis
# into this file.

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
import pulp

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import collections
from oslo_log import log as logging

View File

@@ -14,6 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import datetime
import six

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from six.moves import range
from congress.datalog import base

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.datalog import utility

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from six.moves import range

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.datalog import base

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.datalog import compile

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
import six
from six.moves import range

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import uuid
from oslo_log import log as logging

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import collections
from functools import reduce

View File

@@ -10,6 +10,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from six.moves import range
from congress.datasources import datasource_driver

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import copy
import ceilometerclient.client as cc

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import cinderclient.client
from congress.datasources import datasource_driver

View File

@@ -13,6 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from cloudfoundryclient.v2 import client
from oslo_log import log as logging

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
# datasource config options
REQUIRED = 'required'
OPTIONAL = '(optional)'

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from functools import cmp_to_key
from functools import reduce

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import functools
import inspect
import re

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import glanceclient.v2.client as glclient
import keystoneclient.v2_0.client as ksclient
from oslo_log import log as logging

View File

@@ -10,6 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import heatclient.v1.client as heatclient
import keystoneclient.v2_0.client as ksclient
from oslo_log import log as logging

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from ironicclient import client
import keystoneclient.v2_0.client as ksclient
from oslo_log import log as logging

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import keystoneclient.v2_0.client
from congress.datasources import datasource_driver

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
logger = logging.getLogger(__name__)

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import inspect
import keystoneclient.v2_0.client as ksclient

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import neutronclient.v2_0.client
from oslo_log import log as logging

View File

@@ -14,6 +14,9 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import neutronclient.v2_0.client
from oslo_log import log as logging

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import novaclient.client
from oslo_log import log as logging
import six

View File

@@ -13,6 +13,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import json
try:

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
import swiftclient.service

View File

@@ -14,6 +14,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from oslo_vmware import api
from oslo_vmware import vim_util

View File

@@ -13,6 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_config import cfg
from oslo_db.sqlalchemy import session

View File

@@ -13,6 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import json
from oslo_log import log as logging

View File

@@ -13,6 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
import sqlalchemy as sa

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import functools
from alembic import context

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from logging import config as logging_config
from alembic import context

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from alembic import op
import sqlalchemy as sa

View File

@@ -20,6 +20,9 @@ Revises: 56e86d51ec62
Create Date: 2015-02-05 13:30:04.272571
"""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
# revision identifiers, used by Alembic.
revision = '3cee191c4f84'

View File

@@ -20,6 +20,9 @@ Revises: initial_db
Create Date: 2014-12-18 14:52:20.402861
"""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
# revision identifiers, used by Alembic.
revision = '532e9e1f0f3a'

View File

@@ -20,6 +20,9 @@ Revises: 532e9e1f0f3a
Create Date: 2015-01-14 13:08:53.945019
"""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
# revision identifiers, used by Alembic.
revision = '56e86d51ec62'

View File

@@ -19,6 +19,9 @@ Revision ID: initial_db
Revises: None
"""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
# revision identifiers, used by Alembic.
revision = 'initial_db'

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import os
from alembic import command as alembic_command

View File

@@ -20,6 +20,9 @@ Its purpose is to create comparable metadata with current database schema.
Based on this comparison database can be healed with healing migration.
"""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from congress.db import datasources # noqa
from congress.db import db_policy_rules # noqa

View File

@@ -12,6 +12,11 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import datetime
from oslo_db.sqlalchemy import models

View File

@@ -12,6 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import six

View File

@@ -20,6 +20,10 @@
# - Plexxi API libraries (there is an RPM)
# - Python dependencies (see readme elsewhere, or capture RPM)
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import imp
import sys
import traceback

View File

@@ -11,6 +11,11 @@
# 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.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import uuid

View File

@@ -12,6 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
LOG = logging.getLogger(__name__)

View File

@@ -12,6 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import eventlet
from eventlet import greenthread
from eventlet import hubs

View File

@@ -15,6 +15,9 @@
# under the License.
"""Congress base exception handling."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import sys

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import copy
import os
import os.path

View File

@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import json
from oslo_config import cfg

View File

@@ -13,6 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import itertools
import congress.common.config

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from oslo_utils import uuidutils
import six

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from congress.dse import deepsix

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import subprocess
import time

View File

@@ -15,6 +15,9 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import socket
import sys

View File

@@ -10,6 +10,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import functools
import os
import sys

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
# The Synchronizer class performs periodic polling of the database to
# keep datasources in the Congress server in sync with the
# configuration in the database. This is important because there may

View File

@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_config import cfg
from congress.api import action_model

View File

@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from congress.api import api_utils
from congress.api import webservice
from congress.tests import base

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import json
import mock

View File

@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_config import cfg
from congress.api.system import driver_model

View File

@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from congress.api import error_codes
from congress.tests import base

View File

@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import mock
from oslo_config import cfg
from oslo_utils import uuidutils

View File

@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import mock
from oslo_config import cfg

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import mock
from oslo_config import cfg

View File

@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import mock
from oslo_config import cfg

View File

@@ -12,6 +12,11 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import uuid
from oslo_config import cfg

View File

@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_config import cfg
from congress.api import table_model

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import json
from six.moves import http_client

View File

@@ -13,6 +13,10 @@
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
try:
# For Python 3
import http.client as httplib

View File

@@ -15,6 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import contextlib
import os

View File

@@ -14,6 +14,9 @@
# under the License.
"""Test of Policy Engine For Congress."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import os.path

View File

@@ -14,6 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.datalog import base as datalog_base

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import copy
from congress.datalog import analysis

View File

@@ -12,6 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from congress.datalog import factset
from congress.tests import base

View File

@@ -12,6 +12,11 @@
# License for the specific language governing permissions and limitations
# under the License.
#
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from oslo_log import log as logging
from congress.datalog import base as datalog_base

Some files were not shown because too many files have changed in this diff Show More