Merge pull request #2033 from soupault/remove_python_26

Removed Python 2.6 support and related checks
This commit is contained in:
Steven Silvester
2016-04-05 18:44:02 -05:00
9 changed files with 36 additions and 56 deletions
-2
View File
@@ -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
+2 -2
View File
@@ -1,6 +1,6 @@
Build Requirements
------------------
* `Python >= 2.6 <http://python.org>`__
* `Python >= 2.7 <http://python.org>`__
* `Numpy >= 1.7.2 <http://numpy.scipy.org/>`__
* `Cython >= 0.23 <http://www.cython.org/>`__
* `Six >=1.4 <https://pypi.python.org/pypi/six>`__
@@ -8,7 +8,7 @@ Build Requirements
Runtime requirements
--------------------
* `Python >= 2.6 <http://python.org>`__
* `Python >= 2.7 <http://python.org>`__
* `Numpy >= 1.7.2 <http://numpy.scipy.org/>`__
* `SciPy >= 0.9 <http://scipy.org>`__
* `Matplotlib >= 1.1.0 <http://matplotlib.sf.net>`__
-2
View File
@@ -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`,
+28 -32
View File
@@ -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)
+2
View File
@@ -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
----------------------------
+1 -1
View File
@@ -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
-6
View File
@@ -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
@@ -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
-7
View File
@@ -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