From 02549403618d7a8c4175edd3718a77aa9b1cad1d Mon Sep 17 00:00:00 2001 From: Riccardo Pittau Date: Tue, 5 May 2020 11:26:50 +0200 Subject: [PATCH] Python 3 only Remove need for six library not used anymore. Use unittest mock instead of third party mock. Also add .stestr to gitignore. Change-Id: Id9b72b1169d225a78bf7e160ecebb6f6b8f8c3be --- .gitignore | 3 +++ lower-constraints.txt | 2 -- requirements.txt | 1 - setup.cfg | 1 + sushy_oem_idrac/tests/unit/test_manager.py | 2 +- sushy_oem_idrac/tests/unit/test_root.py | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 894a44c..4ec4048 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,6 @@ venv.bak/ # mypy .mypy_cache/ + +# Unit test +.stestr/ \ No newline at end of file diff --git a/lower-constraints.txt b/lower-constraints.txt index e5afb07..c894830 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -16,7 +16,6 @@ keystoneauth1==3.4.0 linecache2==1.0.0 MarkupSafe==1.0 mccabe==0.2.1 -mock==2.0.0 mox3==0.20.0 openstackdocstheme==1.18.1 os-client-config==1.28.0 @@ -33,7 +32,6 @@ PyYAML==3.12 reno==2.5.0 requests==2.14.2 requestsexceptions==1.2.0 -six==1.10.0 snowballstemmer==1.2.1 Sphinx==1.6.2 sphinxcontrib-websupport==1.0.1 diff --git a/requirements.txt b/requirements.txt index fb7c62c..a85b46e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,5 +4,4 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0 python-dateutil>=2.7.0 # BSD -six>=1.10.0 # MIT sushy>=2.0.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index d28a9c1..c6ca064 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,6 +14,7 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 diff --git a/sushy_oem_idrac/tests/unit/test_manager.py b/sushy_oem_idrac/tests/unit/test_manager.py index 895b14c..6b951bc 100644 --- a/sushy_oem_idrac/tests/unit/test_manager.py +++ b/sushy_oem_idrac/tests/unit/test_manager.py @@ -14,8 +14,8 @@ # under the License. import json +from unittest import mock -import mock from oslotest.base import BaseTestCase import sushy from sushy.resources.manager import manager diff --git a/sushy_oem_idrac/tests/unit/test_root.py b/sushy_oem_idrac/tests/unit/test_root.py index 561d5ce..f378c0d 100644 --- a/sushy_oem_idrac/tests/unit/test_root.py +++ b/sushy_oem_idrac/tests/unit/test_root.py @@ -14,8 +14,8 @@ # under the License. import json +from unittest import mock -import mock from oslotest.base import BaseTestCase from sushy import main