Browse Source

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
changes/63/799563/4
Manpreet Kaur 11 months ago
parent
commit
401a12deeb
  1. 4
      tacker/tests/base.py
  2. 6
      tools/install_venv_common.py

4
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()

6
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):

Loading…
Cancel
Save