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-02 20:18:09 +02:00
parent 1e7dc763b7
commit 17d8ab6103
20 changed files with 0 additions and 42 deletions

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

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

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

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

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

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

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

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

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 unittest import mock

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

View File

@ -12,8 +12,6 @@
"""Tool to check policy file differeneces."""
from __future__ import print_function
import argparse
import yaml