diff options
-rwxr-xr-x | .travis-make-py24-virtualenv.sh | 18 | ||||
-rw-r--r-- | .travis.yml | 58 | ||||
-rw-r--r-- | numpy/core/function_base.py | 4 | ||||
-rw-r--r-- | numpy/core/src/multiarray/datetime.c | 9 |
4 files changed, 83 insertions, 6 deletions
diff --git a/.travis-make-py24-virtualenv.sh b/.travis-make-py24-virtualenv.sh new file mode 100755 index 000000000..625f8b7b7 --- /dev/null +++ b/.travis-make-py24-virtualenv.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +VIRTENV=$1 + +set -x +set -e + +curl -O http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tar.bz2 +tar xjf Python-2.4.6.tar.bz2 +cd Python-2.4.6 +cat >setup.cfg <<EOF +[build_ext] +library_dirs=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/ +EOF +./configure --prefix=$PWD/install +make +make install +virtualenv -p install/bin/python2.4 --distribute $VIRTENV diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..2c15d9dbc --- /dev/null +++ b/.travis.yml @@ -0,0 +1,58 @@ +# After changing this file, check it on: +# http://lint.travis-ci.org/ +language: python +python: + - 2.5 + - 2.6 + - 2.7 + - 3.1 + - 3.2 +env: + # Hack: + # + # We want to test from Python 2.4 to Python 3.2 + # but Travis doesn't support python 2.4, and never will: + # https://github.com/travis-ci/travis-ci/issues/485 + # + # So what we do is add TEST_PY24=true to the build matrix, and then for that one + # version we don't actually use the system python, but instead build 2.4 and + # use it. + # + - TEST_PY24="" +matrix: + include: + - python: 2.5 + env: TEST_PY24="true" +before_install: + - mkdir builds + - pushd builds + # This has to be on a single "virtual line" because of how Travis + # munges each line before executing it to print out the exit status. + # It's okay for it to be on multiple physical lines, so long as you remember: + # - There can't be any leading "-"s + # - All newlines will be removed, so use ";"s + - if [ "${TEST_PY24}" == "true" ]; then + deactivate; + ../.travis-make-py24-virtualenv.sh $PWD/py24-ve; + source $PWD/py24-ve/bin/activate; + fi + - pip install nose + # pip install coverage + - python -V + - popd +install: + - python setup.py install +script: + # We change directories to make sure that python won't find the copy + # of numpy in the source directory. + - mkdir empty + - cd empty + - INSTALLDIR=$(python -c "import os; import numpy; print(os.path.dirname(numpy.__file__))") + - export PYTHONWARNINGS=default + - python ../tools/test-installed-numpy.py + # - coverage run --source=$INSTALLDIR --rcfile=../.coveragerc $(which python) ../tools/test-installed-numpy.py + # - coverage report --rcfile=../.coveragerc --show-missing +notifications: + # Perhaps we should have status emails sent to the mailing list, but + # let's wait to see what people think before turning that on. + email: false diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py index b2f9dc70c..82b524604 100644 --- a/numpy/core/function_base.py +++ b/numpy/core/function_base.py @@ -42,7 +42,7 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False): See Also -------- - arange : Similiar to `linspace`, but uses a step size (instead of the + arange : Similar to `linspace`, but uses a step size (instead of the number of samples). logspace : Samples uniformly distributed in log space. @@ -122,7 +122,7 @@ def logspace(start,stop,num=50,endpoint=True,base=10.0): See Also -------- - arange : Similiar to linspace, with the step size specified instead of the + arange : Similar to linspace, with the step size specified instead of the number of samples. Note that, when used with a float endpoint, the endpoint may or may not be included. linspace : Similar to logspace, but with the samples uniformly distributed diff --git a/numpy/core/src/multiarray/datetime.c b/numpy/core/src/multiarray/datetime.c index 53fee1612..55fb3e7ed 100644 --- a/numpy/core/src/multiarray/datetime.c +++ b/numpy/core/src/multiarray/datetime.c @@ -1808,10 +1808,11 @@ convert_datetime_metadata_tuple_to_datetime_metadata(PyObject *tuple, PyObject *unit_str = NULL; if (!PyTuple_Check(tuple)) { - PyObject_Print(tuple, stderr, 0); - PyErr_SetString(PyExc_TypeError, - "Require tuple for tuple to NumPy datetime " - "metadata conversion"); + PyObject *errmsg; + errmsg = PyUString_FromString("Require tuple for tuple to NumPy " + "datetime metadata conversion, not "); + PyUString_ConcatAndDel(&errmsg, PyObject_Repr(tuple)); + PyErr_SetObject(PyExc_TypeError, errmsg); return -1; } |