summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHervé Beraud <hberaud@redhat.com>2020-06-02 20:20:37 +0200
committerHervé Beraud <hberaud@redhat.com>2020-06-02 20:20:37 +0200
commit2844a38f7fc024fbc7c6c4ceee5edd20ab69bc3e (patch)
tree64eb9ee88d18bbf23781d50c50f688d68e868ee2
parent73dc3cebd38e2753aa419f9f08858e9f5115ab97 (diff)
downloadkeystone-2844a38f7fc024fbc7c6c4ceee5edd20ab69bc3e.tar.gz
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: I2f9d2114b2c5eb66f241646f1896ea17a160e3f3
-rw-r--r--keystone/cmd/cli.py3
-rw-r--r--keystone/cmd/doctor/ldap.py2
-rw-r--r--keystone/identity/backends/ldap/core.py1
-rw-r--r--keystone/oauth1/core.py2
-rw-r--r--keystone/server/flask/application.py2
-rw-r--r--keystone/tests/unit/core.py2
6 files changed, 0 insertions, 12 deletions
diff --git a/keystone/cmd/cli.py b/keystone/cmd/cli.py
index acfffa344..6cd10cfb6 100644
--- a/keystone/cmd/cli.py
+++ b/keystone/cmd/cli.py
@@ -12,9 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from __future__ import absolute_import
-from __future__ import print_function
-
import argparse
import datetime
import os
diff --git a/keystone/cmd/doctor/ldap.py b/keystone/cmd/doctor/ldap.py
index 96e006840..cc1bd8a70 100644
--- a/keystone/cmd/doctor/ldap.py
+++ b/keystone/cmd/doctor/ldap.py
@@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from __future__ import print_function
-
import os
import re
diff --git a/keystone/identity/backends/ldap/core.py b/keystone/identity/backends/ldap/core.py
index d1cf7608a..07f037a40 100644
--- a/keystone/identity/backends/ldap/core.py
+++ b/keystone/identity/backends/ldap/core.py
@@ -11,7 +11,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
import uuid
import ldap.filter
diff --git a/keystone/oauth1/core.py b/keystone/oauth1/core.py
index 68e208e2a..dd8a4482a 100644
--- a/keystone/oauth1/core.py
+++ b/keystone/oauth1/core.py
@@ -14,8 +14,6 @@
"""Main entry point into the OAuth1 service."""
-from __future__ import absolute_import
-
import uuid
import oauthlib.common
diff --git a/keystone/server/flask/application.py b/keystone/server/flask/application.py
index 286fd5945..12d59b289 100644
--- a/keystone/server/flask/application.py
+++ b/keystone/server/flask/application.py
@@ -10,8 +10,6 @@
# License for the specific language governing permissions and limitations
# under the License.
-from __future__ import absolute_import
-
import functools
import sys
diff --git a/keystone/tests/unit/core.py b/keystone/tests/unit/core.py
index 0cb462728..3c65bfbe6 100644
--- a/keystone/tests/unit/core.py
+++ b/keystone/tests/unit/core.py
@@ -11,8 +11,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
import atexit
import base64
import contextlib