Hello [email protected], Alexey Serbin, Andrew Wong, Jordan Birdsell,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/12148
to review the following change.
Change subject: python: fix tests run in Python 3.4 environments
......................................................................
python: fix tests run in Python 3.4 environments
Our Python build installs pandas, which is used in some tests. If we first
install numpy, pandas will use it for its build. This was the case in the
Python 2 variant of the Kudu build, which specified numpy 1.14, the last
version of numpy that was Python 2.6 compatible.
The Python 3 variant didn't explicitly install numpy, and thus was using
numpy 1.15.4 for quite some time. A few weeks ago numpy 1.16.0rc1 was
released, with one notable anti-feature: loss of Python 3.4 compatibility.
This is the version of Python 3 in Ubuntu 14.04; Python 3 tests run in
such environments would fail [1] like so:
../py_env/lib/python3.4/site-packages/py/_path/local.py:668: in pyimport
__import__(modname)
kudu/__init__.py:18: in <module>
from kudu.client import (Client, Table, Scanner, Session, # noqa
kudu/client.pyx:50: in init kudu.client
import pandas
../py_env/lib/python3.4/site-packages/pandas/__init__.py:26: in <module>
from pandas._libs import (hashtable as _hashtable,
../py_env/lib/python3.4/site-packages/pandas/_libs/__init__.py:4: in <module>
from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
pandas/_libs/src/numpy.pxd:865: in init pandas._libs.tslib
???
E ValueError: numpy.ufunc has the wrong size, try recompiling. Expected
192, got 216
The fix is simple: since neither we nor pandas care much about the version
of numpy used, let's explicitly install the last Python 3.4 compatible numpy
in all Python 3 builds.
1. The breakage was not universal, likely due to wheel caching on pypi as
well as in the local pip cache.
Change-Id: I8683c6d24b3b808384a7e4d63142a78f3a7ee5f0
---
M build-support/jenkins/build-and-test.sh
1 file changed, 35 insertions(+), 21 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/48/12148/1
--
To view, visit http://gerrit.cloudera.org:8080/12148
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8683c6d24b3b808384a7e4d63142a78f3a7ee5f0
Gerrit-Change-Number: 12148
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Jordan Birdsell <[email protected]>