From 42ebefab3bc9aa6d9721258541f62e96a573d559 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Tue, 2 Jun 2020 20:50:34 +0200 Subject: [PATCH] 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: I65fb53db889afcf1a947ea61094bfab877853324 --- neutronclient/neutron/v2_0/__init__.py | 2 -- neutronclient/neutron/v2_0/agentscheduler.py | 2 -- neutronclient/neutron/v2_0/auto_allocated_topology.py | 2 -- neutronclient/neutron/v2_0/bgp/dragentscheduler.py | 2 -- neutronclient/neutron/v2_0/bgp/speaker.py | 2 -- neutronclient/neutron/v2_0/flavor/flavor.py | 2 -- neutronclient/neutron/v2_0/floatingip.py | 2 -- neutronclient/neutron/v2_0/fw/firewallpolicy.py | 2 -- neutronclient/neutron/v2_0/lb/healthmonitor.py | 2 -- neutronclient/neutron/v2_0/quota.py | 2 -- neutronclient/neutron/v2_0/router.py | 2 -- neutronclient/osc/v2/fwaas/firewallpolicy.py | 2 -- neutronclient/shell.py | 2 -- 13 files changed, 26 deletions(-) diff --git a/neutronclient/neutron/v2_0/__init__.py b/neutronclient/neutron/v2_0/__init__.py index 3a6e086ee..849a93d9e 100644 --- a/neutronclient/neutron/v2_0/__init__.py +++ b/neutronclient/neutron/v2_0/__init__.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - import abc import argparse import functools diff --git a/neutronclient/neutron/v2_0/agentscheduler.py b/neutronclient/neutron/v2_0/agentscheduler.py index 4476b1dd3..e92b10be1 100644 --- a/neutronclient/neutron/v2_0/agentscheduler.py +++ b/neutronclient/neutron/v2_0/agentscheduler.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - from neutronclient._i18n import _ from neutronclient.neutron import v2_0 as neutronV20 from neutronclient.neutron.v2_0 import network diff --git a/neutronclient/neutron/v2_0/auto_allocated_topology.py b/neutronclient/neutron/v2_0/auto_allocated_topology.py index ef0da4325..a24959e16 100644 --- a/neutronclient/neutron/v2_0/auto_allocated_topology.py +++ b/neutronclient/neutron/v2_0/auto_allocated_topology.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - import argparse from cliff import show diff --git a/neutronclient/neutron/v2_0/bgp/dragentscheduler.py b/neutronclient/neutron/v2_0/bgp/dragentscheduler.py index 81ce8f1ec..d1e1de63f 100644 --- a/neutronclient/neutron/v2_0/bgp/dragentscheduler.py +++ b/neutronclient/neutron/v2_0/bgp/dragentscheduler.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - from neutronclient._i18n import _ from neutronclient.neutron import v2_0 as neutronV20 from neutronclient.neutron.v2_0.bgp import speaker as bgp_speaker diff --git a/neutronclient/neutron/v2_0/bgp/speaker.py b/neutronclient/neutron/v2_0/bgp/speaker.py index 1a70734e5..c6533e2d9 100644 --- a/neutronclient/neutron/v2_0/bgp/speaker.py +++ b/neutronclient/neutron/v2_0/bgp/speaker.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - from neutronclient._i18n import _ from neutronclient.common import utils from neutronclient.common import validators diff --git a/neutronclient/neutron/v2_0/flavor/flavor.py b/neutronclient/neutron/v2_0/flavor/flavor.py index 3058da656..36a052ef2 100644 --- a/neutronclient/neutron/v2_0/flavor/flavor.py +++ b/neutronclient/neutron/v2_0/flavor/flavor.py @@ -13,8 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import print_function - import argparse from neutronclient._i18n import _ diff --git a/neutronclient/neutron/v2_0/floatingip.py b/neutronclient/neutron/v2_0/floatingip.py index 9f0ce089b..5f4ced40a 100644 --- a/neutronclient/neutron/v2_0/floatingip.py +++ b/neutronclient/neutron/v2_0/floatingip.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - import argparse from neutronclient._i18n import _ diff --git a/neutronclient/neutron/v2_0/fw/firewallpolicy.py b/neutronclient/neutron/v2_0/fw/firewallpolicy.py index 0c99948eb..3d9331cd6 100644 --- a/neutronclient/neutron/v2_0/fw/firewallpolicy.py +++ b/neutronclient/neutron/v2_0/fw/firewallpolicy.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - import argparse from neutronclient._i18n import _ diff --git a/neutronclient/neutron/v2_0/lb/healthmonitor.py b/neutronclient/neutron/v2_0/lb/healthmonitor.py index 61cd7df48..33dfbf0bc 100644 --- a/neutronclient/neutron/v2_0/lb/healthmonitor.py +++ b/neutronclient/neutron/v2_0/lb/healthmonitor.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - from neutronclient._i18n import _ from neutronclient.neutron import v2_0 as neutronV20 diff --git a/neutronclient/neutron/v2_0/quota.py b/neutronclient/neutron/v2_0/quota.py index 1a59ac546..a55e29f6d 100644 --- a/neutronclient/neutron/v2_0/quota.py +++ b/neutronclient/neutron/v2_0/quota.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - import abc import argparse diff --git a/neutronclient/neutron/v2_0/router.py b/neutronclient/neutron/v2_0/router.py index ca1c05828..1f78cb85c 100644 --- a/neutronclient/neutron/v2_0/router.py +++ b/neutronclient/neutron/v2_0/router.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - import argparse from oslo_serialization import jsonutils diff --git a/neutronclient/osc/v2/fwaas/firewallpolicy.py b/neutronclient/osc/v2/fwaas/firewallpolicy.py index bd3e60d40..cc6beb54d 100644 --- a/neutronclient/osc/v2/fwaas/firewallpolicy.py +++ b/neutronclient/osc/v2/fwaas/firewallpolicy.py @@ -14,8 +14,6 @@ # under the License. # -from __future__ import print_function - import logging from osc_lib.command import command diff --git a/neutronclient/shell.py b/neutronclient/shell.py index fbc91209f..aed4c8fde 100644 --- a/neutronclient/shell.py +++ b/neutronclient/shell.py @@ -18,8 +18,6 @@ Command-line interface to the Neutron APIs """ -from __future__ import print_function - import argparse import inspect import itertools