diff --git a/tools/install_venv.py b/tools/install_venv.py index 72ffaf0968..50a249bd45 100755 --- a/tools/install_venv.py +++ b/tools/install_venv.py @@ -39,11 +39,6 @@ def die(message, *args): sys.exit(1) -def check_python_version(): - if sys.version_info < (2, 7): - die("Need Python Version >= 2.7") - - def run_command(cmd, redirect_output=True, check_exit_code=True): """ Runs a command in an out-of-process shell, returning the @@ -137,7 +132,6 @@ def print_help(): def main(argv): - check_python_version() check_dependencies() create_virtualenv() install_dependencies() diff --git a/trove/common/stream_codecs.py b/trove/common/stream_codecs.py index 46b1d21d33..8a5cc98a42 100644 --- a/trove/common/stream_codecs.py +++ b/trove/common/stream_codecs.py @@ -19,7 +19,6 @@ import configparser import csv import io import re -import sys import xmltodict import yaml @@ -229,11 +228,7 @@ class IniCodec(StreamCodec): return buf def _init_config_parser(self, sections=None): - # SafeConfigParser was deprecated in Python 3.2 - if sys.version_info >= (3, 2): - parser = configparser.ConfigParser(allow_no_value=True) - else: - parser = configparser.SafeConfigParser(allow_no_value=True) + parser = configparser.ConfigParser(allow_no_value=True) if sections: for section in sections: parser.add_section(section) @@ -452,10 +447,7 @@ class KeyValueCodec(StreamCodec): # Note(zhaochao): In Python 3, when files are opened in text mode, # newlines will be translated to '\n' by default, so we just split # the stream by '\n'. - if sys.version_info[0] >= 3: - lines = stream.split('\n') - else: - lines = stream.split(self._line_terminator) + lines = stream.split('\n') result = {} for line in lines: