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
This commit is contained in:
Manpreet Kaur 2021-07-06 12:48:34 +05:30
parent a98cd4eaa9
commit 401a12deeb
2 changed files with 3 additions and 7 deletions

View File

@ -20,7 +20,6 @@ import gc
import logging import logging
import os import os
import os.path import os.path
import sys
from unittest import mock from unittest import mock
import weakref import weakref
@ -186,9 +185,6 @@ class BaseTestCase(testtools.TestCase):
self.addCleanup(n_rpc.cleanup) self.addCleanup(n_rpc.cleanup)
n_rpc.init(CONF) 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): def fake_admin_context(self):
return context.get_admin_context() return context.get_admin_context()

View File

@ -17,7 +17,7 @@
virtual environments. virtual environments.
Since this script is used to bootstrap a virtualenv from the system's Python 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) sys.exit(1)
def check_python_version(self): def check_python_version(self):
if sys.version_info < (2, 6): if sys.version_info < (3, 6):
self.die("Need Python Version >= 2.6") self.die("Need Python Version >= 3.6")
def run_command_with_code(self, cmd, redirect_output=True, def run_command_with_code(self, cmd, redirect_output=True,
check_exit_code=True): check_exit_code=True):