From 9c4f23a01923563d43b2ddf5048340cc386e2c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Beraud?= Date: Tue, 2 Jun 2020 21:02:18 +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: I95809cf4035a6bc487b24f9e91aaa715921ad842 --- tooz/drivers/consul.py | 2 -- tooz/drivers/etcd3.py | 2 -- tooz/drivers/etcd3gw.py | 2 -- tooz/drivers/redis.py | 2 -- tooz/drivers/zake.py | 2 -- 5 files changed, 10 deletions(-) diff --git a/tooz/drivers/consul.py b/tooz/drivers/consul.py index 2b9c23bb..6f6ef8ae 100644 --- a/tooz/drivers/consul.py +++ b/tooz/drivers/consul.py @@ -14,8 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import absolute_import - import consul from oslo_utils import encodeutils diff --git a/tooz/drivers/etcd3.py b/tooz/drivers/etcd3.py index d8e7aa5c..8dcdaa7c 100644 --- a/tooz/drivers/etcd3.py +++ b/tooz/drivers/etcd3.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 contextlib import functools import threading diff --git a/tooz/drivers/etcd3gw.py b/tooz/drivers/etcd3gw.py index e64301ef..4b9cada6 100644 --- a/tooz/drivers/etcd3gw.py +++ b/tooz/drivers/etcd3gw.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 base64 import threading import uuid diff --git a/tooz/drivers/redis.py b/tooz/drivers/redis.py index c6a55596..f388f4d4 100644 --- a/tooz/drivers/redis.py +++ b/tooz/drivers/redis.py @@ -14,8 +14,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import absolute_import - import contextlib from distutils import version import functools diff --git a/tooz/drivers/zake.py b/tooz/drivers/zake.py index 2c2a475e..6c770837 100644 --- a/tooz/drivers/zake.py +++ b/tooz/drivers/zake.py @@ -12,8 +12,6 @@ # License for the specific language governing permissions and limitations # under the License. -from __future__ import absolute_import - from zake import fake_client from zake import fake_storage