Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility between python 2 and python 3. We previously dropped the support of python 2.7 [2] and now we only support python 3 so we don't need to continue to use this module and the imports listed below. Imports commonly used and their related PEPs: - `division` is related to PEP 238 [3] - `print_function` is related to PEP 3105 [4] - `unicode_literals` is related to PEP 3112 [5] - `with_statement` is related to PEP 343 [6] - `absolute_import` is related to PEP 328 [7] [1] https://docs.python.org/3/library/__future__.html [2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html [3] https://www.python.org/dev/peps/pep-0238 [4] https://www.python.org/dev/peps/pep-3105 [5] https://www.python.org/dev/peps/pep-3112 [6] https://www.python.org/dev/peps/pep-0343 [7] https://www.python.org/dev/peps/pep-0328 Change-Id: Ieccdcdcec557efe480dcf3546299718b0baa37a4
This commit is contained in:
parent
778ed750a0
commit
a550ea1084
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import array
|
||||
|
||||
from os_ken.base import app_manager
|
||||
|
@ -23,8 +23,6 @@
|
||||
# --peers=sw1=localhost:1830:username:password
|
||||
# (Cmd) raw_get sw1
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import cmd
|
||||
import sys
|
||||
|
||||
|
@ -29,8 +29,6 @@
|
||||
# NOTIFICATION from echo-server ['notify-method', ['param1', 'param2']]
|
||||
# (Cmd)
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import ast
|
||||
import cmd
|
||||
import signal
|
||||
|
@ -18,8 +18,6 @@
|
||||
``ovs-vsctl`` command like library to speak OVSDB protocol
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import logging
|
||||
import operator
|
||||
import os
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import base64
|
||||
import inspect
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
from os_ken import cfg
|
||||
import inspect
|
||||
import platform
|
||||
|
@ -1,7 +1,5 @@
|
||||
# flake8: noqa
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from . import core
|
||||
from . import operator
|
||||
from . import prefix
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
This API can be used by various services like RPC, CLI, IoC, etc.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
|
@ -15,7 +15,6 @@
|
||||
"""
|
||||
Defines some base class related to managing green threads.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
|
||||
import abc
|
||||
from collections import OrderedDict
|
||||
|
@ -1,6 +1,4 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
|
||||
from os_ken.services.protocols.bgp.bgpspeaker import RF_VPN_V4
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .configuration_manager import ConfigurationManager
|
||||
from .import_map_manager import ImportMapManager
|
||||
from .peer_manager import PeerManager
|
||||
|
@ -1,4 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from os_ken.services.protocols.bgp.base import ActivityException
|
||||
from os_ken.services.protocols.bgp.operator.command import Command
|
||||
|
@ -1,4 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
import pprint
|
||||
|
@ -17,8 +17,6 @@
|
||||
Database implementation for Zebra protocol service.
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import functools
|
||||
import logging
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
|
||||
from sqlalchemy import Column
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
import socket
|
||||
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
import sys
|
||||
import unittest
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
import sys
|
||||
import unittest
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import time
|
||||
|
||||
from os_ken.tests.integrated.common import docker_base as ctn_base
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import time
|
||||
|
||||
from os_ken.tests.integrated.common import docker_base as ctn_base
|
||||
|
@ -16,8 +16,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import itertools
|
||||
import logging
|
||||
import os
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
|
@ -16,8 +16,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import absolute_import
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import unittest
|
||||
from nose.tools import ok_, eq_, timed, nottest
|
||||
|
||||
|
@ -110,8 +110,6 @@ Here is my sys.config used for this test.
|
||||
|
||||
"""
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import traceback
|
||||
|
||||
import lxml.etree
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import time
|
||||
import random
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import getopt
|
||||
import os
|
||||
import re
|
||||
|
@ -1,4 +1,3 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
# Note: The following import statement is defined in order to resolve
|
||||
# the conflict of the module names between 'os_ken.lib.ovs' and 'ovs'.
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import six
|
||||
import sys
|
||||
import unittest
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import six
|
||||
import sys
|
||||
import unittest
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
try:
|
||||
# Python 3
|
||||
from functools import reduce
|
||||
|
@ -14,8 +14,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import unittest
|
||||
import logging
|
||||
import six
|
||||
|
@ -13,8 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import socket
|
||||
import sys
|
||||
|
Loading…
x
Reference in New Issue
Block a user