From 97e71354ab82ca573df2dd90c60c510aab6b663d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 5 May 2018 08:49:01 -0400 Subject: No more support for 2.6 or 3.3 --- .travis.yml | 2 -- Makefile | 4 ++-- README.rst | 2 +- coverage/backunittest.py | 7 +------ setup.py | 4 +--- tests/test_arcs.py | 4 ---- tests/test_parser.py | 4 ---- tests/test_process.py | 8 -------- tox.ini | 24 ++++-------------------- tox_wheels.ini | 4 ++-- 10 files changed, 11 insertions(+), 52 deletions(-) diff --git a/.travis.yml b/.travis.yml index bb5a4b1..8b318f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,7 @@ language: python cache: pip sudo: false python: - - '2.6' - '2.7' - - '3.3' - '3.4' - '3.5' - '3.6' diff --git a/Makefile b/Makefile index 6174d77..a3c375e 100644 --- a/Makefile +++ b/Makefile @@ -50,10 +50,10 @@ test: TOX_SMOKE_ARGS = -n 6 -m "not expensive" --maxfail=3 $(ARGS) smoke: - COVERAGE_NO_PYTRACER=1 tox -e py26,py33 -- $(TOX_SMOKE_ARGS) + COVERAGE_NO_PYTRACER=1 tox -e py27,py34 -- $(TOX_SMOKE_ARGS) pysmoke: - COVERAGE_NO_CTRACER=1 tox -e py26,py33 -- $(TOX_SMOKE_ARGS) + COVERAGE_NO_CTRACER=1 tox -e py27,py34 -- $(TOX_SMOKE_ARGS) metacov: COVERAGE_COVERAGE=yes tox $(ARGS) diff --git a/README.rst b/README.rst index a799e9d..9336b97 100644 --- a/README.rst +++ b/README.rst @@ -19,7 +19,7 @@ library to determine which lines are executable, and which have been executed. Coverage.py runs on many versions of Python: -* CPython 2.6, 2.7 and 3.3 through 3.7. +* CPython 2.7 and 3.4 through 3.7. * PyPy2 5.10 and PyPy3 5.10. * Jython 2.7.1, though not for reporting. * IronPython 2.7.7, though not for reporting. diff --git a/coverage/backunittest.py b/coverage/backunittest.py index 09574cc..1b08483 100644 --- a/coverage/backunittest.py +++ b/coverage/backunittest.py @@ -3,12 +3,7 @@ """Implementations of unittest features from the future.""" -# Use unittest2 if it's available, otherwise unittest. This gives us -# back-ported features for 2.6. -try: - import unittest2 as unittest -except ImportError: - import unittest +import unittest def unittest_has(method): diff --git a/setup.py b/setup.py index 77bc903..99874fd 100644 --- a/setup.py +++ b/setup.py @@ -24,10 +24,8 @@ License :: OSI Approved :: Apache Software License Operating System :: OS Independent 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 @@ -107,7 +105,7 @@ setup_args = dict( classifiers=classifier_list, url="https://bitbucket.org/ned/coveragepy", - python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", + python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", ) # A replacement for the build_ext command which raises a single exception diff --git a/tests/test_arcs.py b/tests/test_arcs.py index ef71ea1..4bd804b 100644 --- a/tests/test_arcs.py +++ b/tests/test_arcs.py @@ -407,8 +407,6 @@ class LoopArcTest(CoverageTest): ) def test_other_comprehensions(self): - if env.PYVERSION < (2, 7): - self.skipTest("No set or dict comprehensions before 2.7") # Set comprehension: self.check_coverage("""\ o = ((1,2), (3,4)) @@ -431,8 +429,6 @@ class LoopArcTest(CoverageTest): ) def test_multiline_dict_comp(self): - if env.PYVERSION < (2, 7): - self.skipTest("No set or dict comprehensions before 2.7") if env.PYVERSION < (3, 5): arcz = "-42 2B B-4 2-4" else: diff --git a/tests/test_parser.py b/tests/test_parser.py index afb8771..89ef6dc 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -260,10 +260,6 @@ class ParserMissingArcDescriptionTest(CoverageTest): ) def test_missing_arc_descriptions_for_small_callables(self): - # We use 2.7 features here, so just skip this test on 2.6 - if env.PYVERSION < (2, 7): - self.skipTest("No dict or set comps in 2.6") - parser = self.parse_text(u"""\ callables = [ lambda: 2, diff --git a/tests/test_process.py b/tests/test_process.py index fb08562..f0b1cde 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -727,10 +727,6 @@ class ProcessTest(CoverageTest): ) def test_module_name(self): - if sys.version_info < (2, 7): - # Python 2.6 thinks that coverage is a package that can't be - # executed - self.skipTest("-m doesn't work the same < Python 2.7") # https://bitbucket.org/ned/coveragepy/issues/478/help-shows-silly-program-name-when-running out = self.run_command("python -m coverage") self.assertIn("Use 'coverage help' for help", out) @@ -852,10 +848,6 @@ class EnvironmentTest(CoverageTest): self.assert_tryexecfile_output(out_cov, out_py) def test_coverage_run_dashm_is_like_python_dashm_with__main__207(self): - if sys.version_info < (2, 7): - # Coverage.py isn't bug-for-bug compatible in the behavior - # of -m for Pythons < 2.7 - self.skipTest("-m doesn't work the same < Python 2.7") # https://bitbucket.org/ned/coveragepy/issue/207 self.make_file("package/__init__.py", "print('init')") self.make_file("package/__main__.py", "print('main')") diff --git a/tox.ini b/tox.ini index c703eb5..deab539 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt [tox] -envlist = py{26,27,33,34,35,36,37}, pypy{2,3}, jython, doc, lint +envlist = py{27,34,35,36,37}, pypy{2,3}, jython, doc, lint skip_missing_interpreters = {env:COVERAGE_SKIP_MISSING_INTERPRETERS:True} toxworkdir = {env:TOXWORKDIR:.tox} @@ -19,11 +19,9 @@ deps = PyContracts==1.8.3 unittest-mixins==1.4 #-e/Users/ned/unittest_mixins - py26: unittest2==1.1.0 - py{27,33,34,35,36}: gevent==1.2.2 - py26: eventlet==0.21.0 - py{27,33,34,35,36,37}: eventlet==0.22.0 - py{26,27,33,34,35,36,37}: greenlet==0.4.13 + py{27,34,35,36}: gevent==1.2.2 + py{27,34,35,36,37}: eventlet==0.22.0 + py{27,34,35,36,37}: greenlet==0.4.13 # Windows can't update the pip version with pip running, so use Python # to install things. @@ -43,13 +41,6 @@ commands = # Remove the C extension so that we can test the PyTracer python igor.py zip_mods install_egg remove_extension - # When running parallel tests, many processes might all try to import the - # same modules at once. This should be safe, but especially on Python 3.3, - # this caused a number of test failures trying to import usepkgs. To - # prevent the race condition, pre-compile the tests/modules directory. - py33: python -m compileall -q -f tests/modules - py33: python -c "import time; time.sleep(1.1)" - # Test with the PyTracer python igor.py test_with_tracer py {posargs} @@ -57,13 +48,6 @@ commands = python setup.py --quiet build_ext --inplace python igor.py test_with_tracer c {posargs} -[testenv:py26] -basepython = python2.6 -install_command = python -m pip.__main__ install -U {opts} {packages} - -[testenv:py33] -basepython = python3.3 - [testenv:pypy] # The "pypy" environment is for Travis. Probably can make Travis use one of # the other environments... diff --git a/tox_wheels.ini b/tox_wheels.ini index 1871594..adf48bf 100644 --- a/tox_wheels.ini +++ b/tox_wheels.ini @@ -2,14 +2,14 @@ # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt [tox] -envlist = py{26,27,33,34,35,36,sys} +envlist = py{27,34,35,36,sys} toxworkdir = {toxinidir}/.tox_kits [testenv] deps = -rrequirements/wheel.pip -commands = +commands = python -c "import sys; print(sys.real_prefix)" python setup.py bdist_wheel {posargs} -- cgit v1.2.1