Skip to content

Commit

Permalink
Drop support for EOL Python 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Mar 11, 2018
1 parent 42c0589 commit bb3c69a
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: python

python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
Expand Down Expand Up @@ -30,7 +29,7 @@ script:
- python test/acid.py -aaa --experimental test/example.py
- python test/acid.py -aaa --experimental test/example_with_reduce.py

- if [ "$TRAVIS_PYTHON_VERSION" == "3.3" ]; then python -m doctest -v README.rst; fi
- if [ "$TRAVIS_PYTHON_VERSION" == "3.6" ]; then python -m doctest -v README.rst; fi

- if [[ "$TRAVIS_PYTHON_VERSION" != "pypy"* ]]; then pycodestyle autopep8.py; fi
- if [[ "$TRAVIS_PYTHON_VERSION" != "pypy"* ]]; then pip install pyflakes; pyflakes autopep8.py; fi
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ Testing
Test cases are in ``test/test_autopep8.py``. They can be run directly via
``python test/test_autopep8.py`` or via tox_. The latter is useful for
testing against multiple Python interpreters. (We currently test against
CPython versions 2.7, 3.3, 3.4, 3.5 and 3.6. We also test against PyPy.)
CPython versions 2.7, 3.4, 3.5 and 3.6. We also test against PyPy.)

.. _`tox`: https://pypi.python.org/pypi/tox

Expand Down
2 changes: 1 addition & 1 deletion autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -3228,7 +3228,7 @@ def global_fixes():

def _get_parameters(function):
# pylint: disable=deprecated-method
if sys.version_info >= (3, 3):
if sys.version_info.major >= 3:
# We need to match "getargspec()", which includes "self" as the first
# value for methods.
# https://bugs.python.org/issue17481#msg209469
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def version():
'Programming Language :: Python :: 2',
'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',
Expand Down
4 changes: 2 additions & 2 deletions test/example_with_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def execfile(fn, globs=None, locs=None):
from os.path import isdir, split

# Avoid try/except due to potential problems with delayed import mechanisms.
if sys.version_info >= (3, 3) and sys.implementation.name == "cpython":
if sys.version_info.major >= 3 and sys.implementation.name == "cpython":
import importlib._bootstrap as importlib_bootstrap
else:
importlib_bootstrap = None
Expand Down Expand Up @@ -1292,7 +1292,7 @@ def has_resource(self, resource_name):
def has_metadata(self, name):
return self.egg_info and self._has(self._fn(self.egg_info,name))

if sys.version_info <= (3,):
if sys.version_info.major == 2:
def get_metadata(self, name):
if not self.egg_info:
return ""
Expand Down
2 changes: 1 addition & 1 deletion test/test_autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -6167,7 +6167,7 @@ def test_e501_experimental_with_in(self):
with autopep8_context(line, options=['--experimental']) as result:
self.assertEqual(fixed, result)

@unittest.skipIf(sys.version_info >= (3, ), 'syntax error in Python3')
@unittest.skipIf(sys.version_info.major >= 3, 'syntax error in Python3')
def test_e501_print_isnot_function(self):
line = """\
Expand Down
4 changes: 2 additions & 2 deletions test/vim_autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@


def encode(text):
if sys.version_info[0] >= 3:
if sys.version_info.major >= 3:
return text
else:
return text.encode(ENCODING)


def decode(text):
if sys.version_info[0] >= 3:
if sys.version_info.major >= 3:
return text
else:
return text.decode(ENCODING)
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py27,py33,py34,py35,py36
envlist=py27,py34,py35,py36

[testenv]
commands=
Expand Down

0 comments on commit bb3c69a

Please sign in to comment.