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: Ic03754dcaaa4f1c0018294aa52bb05d956aa5d10
This commit is contained in:
Hervé Beraud
2020-06-03 10:45:18 +02:00
parent 1e7dc763b7
commit 17d8ab6103
20 changed files with 0 additions and 42 deletions
-2
View File
@@ -22,8 +22,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
from __future__ import print_function
import logging
import os
import sys
-2
View File
@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from django import template
-2
View File
@@ -12,8 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from collections import OrderedDict
from django.conf import settings
-2
View File
@@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import division
import csv
import io
-2
View File
@@ -18,8 +18,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
import logging
import math
-3
View File
@@ -16,9 +16,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import division
import _thread as thread
import collections
from collections import abc
-2
View File
@@ -17,8 +17,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
import collections
from collections.abc import Sequence
import copy
-2
View File
@@ -18,8 +18,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
import collections
import logging
from operator import attrgetter
@@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import multiprocessing
import os
import re
@@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import difflib
import imp
import os
@@ -10,9 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import json
import sys
@@ -12,8 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from django.conf import settings
from django import template
@@ -13,8 +13,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
import os
from urllib.request import pathname2url
@@ -16,8 +16,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from django.conf import settings
from horizon import exceptions
@@ -15,8 +15,6 @@
# 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 absolute_import
from unittest import mock
@@ -16,8 +16,6 @@
# 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 absolute_import
from unittest import mock
from django.conf import settings
@@ -15,8 +15,6 @@
# 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 absolute_import
from unittest import mock
from horizon import exceptions
@@ -17,8 +17,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
import collections
from unittest import mock
-2
View File
@@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import division
import datetime
from django.conf import settings
-2
View File
@@ -12,8 +12,6 @@
"""Tool to check policy file differeneces."""
from __future__ import print_function
import argparse
import yaml