diff --git a/.travis.yml b/.travis.yml index 38687c646d60..7a6bdf709c2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,9 @@ language: python matrix: include: - - python: 2.6 - dist: trusty - sudo: false - python: 2.7 dist: trusty sudo: false - - python: 3.3 - dist: trusty - sudo: false - - python: 3.4 - dist: trusty - sudo: false - python: 3.5 dist: trusty sudo: false diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 329429deb89b..3fa85cae0e53 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -28,8 +28,7 @@ contributions as well: * Code should follow `pep 8 `__, although if you are modifying an existing module, it is more important for the code to be consistent if there are any discrepancies. -* Code must work on ``python2.6``, ``python2.7``, and ``python3.3``, - ``python3.4`` and higher. +* Code must work on ``python2.7``, and ``python3.5`` and higher. * The AWS CLI is cross platform and code must work on at least Linux, Windows, and Mac OS X. Avoid platform specific behavior. * If you would like to implement support for a significant feature that is not diff --git a/README.rst b/README.rst index d209b77b844b..60e3016fb0ed 100644 --- a/README.rst +++ b/README.rst @@ -15,10 +15,7 @@ This package provides a unified command line interface to Amazon Web Services. The aws-cli package works on Python versions: -* 2.6.5 and greater * 2.7.x and greater -* 3.3.x and greater -* 3.4.x and greater * 3.5.x and greater * 3.6.x and greater * 3.7.x and greater diff --git a/awscli/testutils.py b/awscli/testutils.py index faf29484a495..2a3c7aab9ec2 100644 --- a/awscli/testutils.py +++ b/awscli/testutils.py @@ -1,4 +1,4 @@ -# Copyright 2012-2014 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2012-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of @@ -33,6 +33,8 @@ import binascii from pprint import pformat from subprocess import Popen, PIPE +import unittest + from awscli.compat import StringIO @@ -59,15 +61,6 @@ from awscli import EnvironmentVariables -# The unittest module got a significant overhaul -# in 2.7, so if we're in 2.6 we can use the backported -# version unittest2. -if sys.version_info[:2] == (2, 6): - import unittest2 as unittest -else: - import unittest - - # In python 3, order matters when calling assertEqual to # compare lists and dictionaries with lists. Therefore, # assertItemsEqual needs to be used but it is renamed to @@ -715,7 +708,7 @@ def _get_memory_with_ps(pid): else: # Get the RSS from output that looks like this: # USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND - # user 47102 0.0 0.1 2437000 4496 s002 S+ 7:04PM 0:00.12 python2.6 + # user 47102 0.0 0.1 2437000 4496 s002 S+ 7:04PM 0:00.12 python2 return int(stdout.splitlines()[1].split()[5]) * 1024 diff --git a/requirements26.txt b/requirements26.txt deleted file mode 100644 index e78d5b637997..000000000000 --- a/requirements26.txt +++ /dev/null @@ -1 +0,0 @@ -unittest2==0.8.0 diff --git a/scripts/ci/install b/scripts/ci/install index 62846cb6ce6b..69b1f4af1618 100755 --- a/scripts/ci/install +++ b/scripts/ci/install @@ -20,8 +20,6 @@ try: except KeyError: python_version = '.'.join([str(i) for i in sys.version_info[:2]]) -if python_version == '2.6': - run('pip install -r requirements26.txt') run('pip install -r requirements.txt') run('pip install coverage') diff --git a/scripts/make-bundle b/scripts/make-bundle index 29dd8cfbecbc..da838db2972e 100755 --- a/scripts/make-bundle +++ b/scripts/make-bundle @@ -25,16 +25,6 @@ from contextlib import contextmanager # by awscli/botocore. PACKAGE_VERSION = { 'virtualenv': '15.1.0', - # These packages are included because they are required for - # python2.6, but our normal dependency downloading via pip - # only works if you use python2.6. To fix this issue, we're - # explicitly saying that we need to download these packages - # even if pip doesn't think we need them. That way we can - # run make-bundle in python versions besides 2.6. - 'ordereddict': '1.1', - 'simplejson': '3.3.0', - 'argparse': '1.2.1', - 'python-dateutil': '2.6.1', 'setuptools-scm': '1.15.7', } INSTALL_ARGS = '--allow-all-external --no-use-wheel' @@ -175,9 +165,7 @@ def main(): scratch_dir = create_scratch_dir() package_dir = os.path.join(scratch_dir, 'packages') print("Bundle dir at: %s" % scratch_dir) - download_package_tarballs( - package_dir, - packages=['virtualenv', 'ordereddict', 'simplejson', 'argparse', 'python-dateutil']) + download_package_tarballs(package_dir, packages=['virtualenv']) # Some packages require setup time dependencies, and so we will need to # manually install them. We isolate them to a particular directory so we diff --git a/setup.cfg b/setup.cfg index 30f962dc6782..4fa9e1eb62fb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,4 +10,3 @@ requires-dist = rsa>=3.1.2,<=3.5.0 PyYAML>=3.10,<=3.13 s3transfer>=0.1.12,<0.2.0 - argparse>=1.1; python_version=="2.6" diff --git a/setup.py b/setup.py index 5f1977a73b19..10416ba08ad0 100644 --- a/setup.py +++ b/setup.py @@ -31,12 +31,6 @@ def find_version(*file_paths): 'PyYAML>=3.10,<=3.13'] -if sys.version_info[:2] == (2, 6): - # For python2.6 we have to require argparse since it - # was not in stdlib until 2.7. - requires.append('argparse>=1.1') - - setup_options = dict( name='awscli', version=find_version("awscli", "__init__.py"), @@ -52,11 +46,6 @@ def find_version(*file_paths): 'examples/*/*/*.rst', 'topics/*.rst', 'topics/*.json']}, install_requires=requires, - extras_require={ - ':python_version=="2.6"': [ - 'argparse>=1.1', - ] - }, license="Apache License 2.0", classifiers=( 'Development Status :: 5 - Production/Stable', @@ -66,11 +55,8 @@ def find_version(*file_paths): 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',