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: I2f9d4c9a760bd9a9dbb9cde5bcb8af24fd4b34b9
This commit is contained in:
Hervé Beraud 2020-06-02 20:12:42 +02:00
parent 546b046800
commit d113fc7087
24 changed files with 0 additions and 91 deletions

View File

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

View File

@ -85,11 +85,6 @@
# Owners of at least 4 changes: 1682
# Owners of at least 5 changes: 1504
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import sys

View File

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

View File

@ -10,10 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import argparse
from openstack_election import check_candidacy

View File

@ -10,10 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import argparse
from openstack_election import check_candidacy

View File

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

View File

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

View File

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

View File

@ -10,10 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import glob
import hashlib

View File

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

View File

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

View File

@ -10,10 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import datetime
import pytz

View File

@ -1,5 +1,3 @@
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import jinja2

View File

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

View File

@ -10,10 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
class ElectionException(Exception):
"""Base Election Exception

View File

@ -17,8 +17,6 @@
# counts for each governance project-team, as well as a combined set
# for all teams.
from __future__ import print_function
import csv
import datetime
import os

View File

@ -10,10 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import sys
if sys.version_info.major < 3:

View File

@ -10,10 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import testtools
from openstack_election.tests import fixtures as election_fixtures

View File

@ -10,10 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import mock
from openstack_election.cmds import ci_check_all_candidate_files

View File

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

View File

@ -10,10 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import mock
from openstack_election import exception

View File

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

View File

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

View File

@ -12,9 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import division
from __future__ import print_function
import prettytable
CIVS_BASE = 'https://civs.cs.cornell.edu/cgi-bin/results.pl'