From 401a12deeb67a92b77e0c16d30e74861e0568cfa Mon Sep 17 00:00:00 2001 From: Manpreet Kaur Date: Tue, 6 Jul 2021 12:48:34 +0530 Subject: [PATCH] Update references to sys.version_info We support Python 3.6 as a minimum now. Updating minimum version check from py2.6 to py3.6 and removing no op checks. Change-Id: Iac35026682578c30d06b29969e133438be777ebd --- tacker/tests/base.py | 4 ---- tools/install_venv_common.py | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tacker/tests/base.py b/tacker/tests/base.py index 7e7d9fd67..dbc9c84c2 100644 --- a/tacker/tests/base.py +++ b/tacker/tests/base.py @@ -20,7 +20,6 @@ import gc import logging import os import os.path -import sys from unittest import mock import weakref @@ -186,9 +185,6 @@ class BaseTestCase(testtools.TestCase): self.addCleanup(n_rpc.cleanup) n_rpc.init(CONF) - if sys.version_info < (2, 7) and getattr(self, 'fmt', '') == 'xml': - raise self.skipException('XML Testing Skipped in Py26') - def fake_admin_context(self): return context.get_admin_context() diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index 79f5f45e0..cf780bc38 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -17,7 +17,7 @@ virtual environments. Since this script is used to bootstrap a virtualenv from the system's Python -environment, it should be kept strictly compatible with Python 2.6. +environment, it should be kept strictly compatible with Python 3.6. """ @@ -44,8 +44,8 @@ class InstallVenv(object): sys.exit(1) def check_python_version(self): - if sys.version_info < (2, 6): - self.die("Need Python Version >= 2.6") + if sys.version_info < (3, 6): + self.die("Need Python Version >= 3.6") def run_command_with_code(self, cmd, redirect_output=True, check_exit_code=True):