diff --git a/.travis.yml b/.travis.yml index 8d5ed162..2f33da83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,8 +37,6 @@ notifications: matrix: include: - - python: 2.6 - env: WITH_PYAMG=1 NO_SPHINX=1 - python: 2.7 env: PIP_FLAGS="--pre" - python: 2.7 diff --git a/DEPENDS.txt b/DEPENDS.txt index 1dfd318d..8b56bd40 100644 --- a/DEPENDS.txt +++ b/DEPENDS.txt @@ -1,6 +1,6 @@ Build Requirements ------------------ -* `Python >= 2.6 `__ +* `Python >= 2.7 `__ * `Numpy >= 1.7.2 `__ * `Cython >= 0.23 `__ * `Six >=1.4 `__ @@ -8,7 +8,7 @@ Build Requirements Runtime requirements -------------------- -* `Python >= 2.6 `__ +* `Python >= 2.7 `__ * `Numpy >= 1.7.2 `__ * `SciPy >= 0.9 `__ * `Matplotlib >= 1.1.0 `__ diff --git a/TODO.txt b/TODO.txt index b9bb5339..b1a505bf 100644 --- a/TODO.txt +++ b/TODO.txt @@ -21,8 +21,6 @@ Version 0.14 Version 0.13 ------------ -* Require Python 2.7+, remove warning in `__init__.py` and 2.6 hack in - `doc/release/contribs.py`. * Remove deprecated `None` defaults for `skimage.exposure.rescale_intensity` * Remove deprecated edge filters `hsobel`, `vsobel`, `hscharr`, `vscharr`, `hprewitt`, `vprewitt`, `roberts_positive_diagonal`, diff --git a/doc/release/contribs.py b/doc/release/contribs.py index 6fcc0d87..d6dcc49b 100755 --- a/doc/release/contribs.py +++ b/doc/release/contribs.py @@ -10,45 +10,41 @@ if len(sys.argv) != 2: tag = sys.argv[1] +def call(cmd): + return subprocess.check_output(shlex.split(cmd), universal_newlines=True).split('\n') -if not sys.version_info[:2] == (2, 6): +tag_date = call("git show --format='%%ci' %s" % tag)[0] +print("Release %s was on %s\n" % (tag, tag_date)) - def call(cmd): - return subprocess.check_output(shlex.split(cmd), universal_newlines=True).split('\n') +merges = call("git log --since='%s' --merges --format='>>>%%B' --reverse" % tag_date) +merges = [m for m in merges if m.strip()] +merges = '\n'.join(merges).split('>>>') +merges = [m.split('\n')[:2] for m in merges] +merges = [m for m in merges if len(m) == 2 and m[1].strip()] - tag_date = call("git show --format='%%ci' %s" % tag)[0] - print("Release %s was on %s\n" % (tag, tag_date)) +num_commits = call("git rev-list %s..HEAD --count" % tag)[0] +print("A total of %s changes have been committed.\n" % num_commits) - merges = call("git log --since='%s' --merges --format='>>>%%B' --reverse" % tag_date) - merges = [m for m in merges if m.strip()] - merges = '\n'.join(merges).split('>>>') - merges = [m.split('\n')[:2] for m in merges] - merges = [m for m in merges if len(m) == 2 and m[1].strip()] +print("It contained the following %d merges:\n" % len(merges)) +for (merge, message) in merges: + if merge.startswith('Merge pull request #'): + PR = ' (%s)' % merge.split()[3] + else: + PR = '' - num_commits = call("git rev-list %s..HEAD --count" % tag)[0] - print("A total of %s changes have been committed.\n" % num_commits) + print('- ' + message + PR) - print("It contained the following %d merges:\n" % len(merges)) - for (merge, message) in merges: - if merge.startswith('Merge pull request #'): - PR = ' (%s)' % merge.split()[3] - else: - PR = '' +print("\nMade by the following committers [alphabetical by last name]:\n") - print('- ' + message + PR) +authors = call("git log --since='%s' --format=%%aN" % tag_date) +authors = [a.strip() for a in authors if a.strip()] +def key(author): + author = [v for v in author.split() if v[0] in string.ascii_letters] + if len(author) > 0: + return author[-1] - print("\nMade by the following committers [alphabetical by last name]:\n") +authors = sorted(set(authors), key=key) - authors = call("git log --since='%s' --format=%%aN" % tag_date) - authors = [a.strip() for a in authors if a.strip()] - - def key(author): - author = [v for v in author.split() if v[0] in string.ascii_letters] - if len(author) > 0: - return author[-1] - - authors = sorted(set(authors), key=key) - - for a in authors: - print('- ' + a) +for a in authors: + print('- ' + a) diff --git a/doc/release/release_dev.txt b/doc/release/release_dev.txt index 2d200c7c..14bcc9c6 100644 --- a/doc/release/release_dev.txt +++ b/doc/release/release_dev.txt @@ -33,6 +33,8 @@ API Changes Deprecations ------------ +- Python 2.6 support has been dropped. Minimal required Python version is 2.7. + Contributors to this release ---------------------------- diff --git a/optional_requirements.txt b/optional_requirements.txt index 7b0fead5..8bc53bb0 100644 --- a/optional_requirements.txt +++ b/optional_requirements.txt @@ -3,4 +3,4 @@ imread; python_version != '2.7' SimpleITK; python_version != '3.4' and python_version != '3.5' astropy tifffile -imageio; python_version != '2.6' +imageio diff --git a/skimage/__init__.py b/skimage/__init__.py index c2456954..9d2bbe66 100644 --- a/skimage/__init__.py +++ b/skimage/__init__.py @@ -158,10 +158,4 @@ else: from .util.dtype import * -if sys.version.startswith('2.6'): - msg = ("Python 2.6 is deprecated and will not be supported in " - "scikit-image 0.13+") - warnings.warn(msg, stacklevel=2) - - del warnings, functools, osp, imp, sys diff --git a/skimage/_shared/tests/test_version_requirements.py b/skimage/_shared/tests/test_version_requirements.py index 59cf5814..3ebc8122 100644 --- a/skimage/_shared/tests/test_version_requirements.py +++ b/skimage/_shared/tests/test_version_requirements.py @@ -15,14 +15,13 @@ def test_get_module_version(): def test_is_installed(): - assert version_req.is_installed('python', '>=2.6') + assert version_req.is_installed('python', '>=2.7') assert not version_req.is_installed('numpy', '<1.0') def test_require(): - - # A function that only runs on Python >2.6 and numpy > 1.5 (should pass) - @version_req.require('python', '>2.6') + # A function that only runs on Python >2.7 and numpy > 1.5 (should pass) + @version_req.require('python', '>2.7') @version_req.require('numpy', '>1.5') def foo(): return 1 diff --git a/tools/travis_before_install.sh b/tools/travis_before_install.sh index 25e3185a..54a431ed 100755 --- a/tools/travis_before_install.sh +++ b/tools/travis_before_install.sh @@ -32,13 +32,6 @@ retry () { # add build dependencies echo "cython>=0.23.4" >> requirements.txt -# require networkx 1.9.1 on 2.6, as 2.6 support was dropped in 1.10 -# require matplotlib 1.4.3 on 2.6, as 2.6 support was dropped in 1.5 -if [[ $TRAVIS_PYTHON_VERSION == 2.6* ]]; then - sed -i 's/networkx.*/networkx==1.9.1/g' requirements.txt - sed -i 's/matplotlib.*/matplotlib==1.4.3/g' requirements.txt -fi - if [[ $MINIMUM_REQUIREMENTS == 1 ]]; then sed -i 's/>=/==/g' requirements.txt fi