This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 3da236a  ARROW-5330: [CI] Run Python Flight tests on Travis [skip 
appveyor]
3da236a is described below

commit 3da236ac38f7d98a326f361d741b2c828221ba2b
Author: Antoine Pitrou <[email protected]>
AuthorDate: Mon May 20 20:57:52 2019 +0200

    ARROW-5330: [CI] Run Python Flight tests on Travis [skip appveyor]
    
    Author: Antoine Pitrou <[email protected]>
    
    Closes #4353 from pitrou/ARROW-5330-travis-python-flight and squashes the 
following commits:
    
    5875e8b28 <Antoine Pitrou> ARROW-5330:  Run Python Flight tests on Travis
---
 ci/travis_script_python.sh | 3 +++
 python/pyarrow/flight.py   | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/ci/travis_script_python.sh b/ci/travis_script_python.sh
index 5c95eb5..1eb06fb 100755
--- a/ci/travis_script_python.sh
+++ b/ci/travis_script_python.sh
@@ -156,6 +156,9 @@ export PYARROW_BUILD_TYPE=$ARROW_BUILD_TYPE
 export PYARROW_WITH_PARQUET=1
 export PYARROW_WITH_PLASMA=1
 export PYARROW_WITH_ORC=1
+if [ "$ARROW_TRAVIS_FLIGHT" == "1" ] && [ "$PYTHON_VERSION" != "2.7" ]; then
+  export PYARROW_WITH_FLIGHT=1
+fi
 if [ "$ARROW_TRAVIS_PYTHON_GANDIVA" == "1" ]; then
   export PYARROW_WITH_GANDIVA=1
 fi
diff --git a/python/pyarrow/flight.py b/python/pyarrow/flight.py
index 9b881bd..7d32778 100644
--- a/python/pyarrow/flight.py
+++ b/python/pyarrow/flight.py
@@ -15,6 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
+import sys
+
+if sys.version_info < (3,):
+    raise ImportError("Python Flight bindings require Python 3")
+
 from pyarrow._flight import (  # noqa
     Action,
     ActionType,

Reply via email to