Python 3.8 compatibility (#7754)

This commit is contained in:
mehrdadn
2020-04-01 10:03:23 -07:00
committed by GitHub
parent 24bf6ad607
commit 65054a2c7c
9 changed files with 87 additions and 46 deletions
+8 -4
View File
@@ -15,17 +15,21 @@ DOWNLOAD_DIR=python_downloads
PY_VERSIONS=("3.5.3"
"3.6.1"
"3.7.0")
"3.7.0"
"3.8.2")
PY_INSTS=("python-3.5.3-macosx10.6.pkg"
"python-3.6.1-macosx10.6.pkg"
"python-3.7.0-macosx10.6.pkg")
"python-3.7.0-macosx10.6.pkg"
"python-3.8.2-macosx10.9.pkg")
PY_MMS=("3.5"
"3.6"
"3.7")
"3.7"
"3.8")
# The minimum supported numpy version is 1.14, see
# https://issues.apache.org/jira/browse/ARROW-3141
NUMPY_VERSIONS=("1.14.5"
"1.14.5"
"1.14.5"
"1.14.5")
@@ -76,7 +80,7 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
$PIP_CMD install -q setuptools_scm==3.1.0
# Fix the numpy version because this will be the oldest numpy version we can
# support.
$PIP_CMD install -q numpy==$NUMPY_VERSION cython==0.29.0
$PIP_CMD install -q numpy==$NUMPY_VERSION cython==0.29.15
# Install wheel to avoid the error "invalid command 'bdist_wheel'".
$PIP_CMD install -q wheel
# Set the commit SHA in __init__.py.
+4 -2
View File
@@ -13,11 +13,13 @@ chmod +x /usr/bin/nproc
PYTHONS=("cp35-cp35m"
"cp36-cp36m"
"cp37-cp37m")
"cp37-cp37m"
"cp38-cp38")
# The minimum supported numpy version is 1.14, see
# https://issues.apache.org/jira/browse/ARROW-3141
NUMPY_VERSIONS=("1.14.5"
"1.14.5"
"1.14.5"
"1.14.5")
@@ -55,7 +57,7 @@ for ((i=0; i<${#PYTHONS[@]}; ++i)); do
pushd python
# Fix the numpy version because this will be the oldest numpy version we can
# support.
/opt/python/${PYTHON}/bin/pip install -q numpy==${NUMPY_VERSION} cython==0.29.0
/opt/python/${PYTHON}/bin/pip install -q numpy==${NUMPY_VERSION} cython==0.29.15
# Set the commit SHA in __init__.py.
if [ -n "$TRAVIS_COMMIT" ]; then
sed -i.bak "s/{{RAY_COMMIT_SHA}}/$TRAVIS_COMMIT/g" ray/__init__.py && rm ray/__init__.py.bak
+1 -1
View File
@@ -417,7 +417,7 @@ def _numpy_frombuffer(buffer, dtype, shape, order):
array = _frombuffer(buffer, dtype, shape, order)
# Unfortunately, numpy does not follow the standard, so we still
# have to set the readonly flag for it here.
array.setflags(write=not buffer.readonly)
array.setflags(write=isinstance(buffer, bytearray) or not buffer.readonly)
return array
+1 -1
View File
@@ -191,7 +191,7 @@ setup(
# The BinaryDistribution argument triggers build_ext.
distclass=BinaryDistribution,
install_requires=requires,
setup_requires=["cython >= 0.29"],
setup_requires=["cython >= 0.29.14"],
extras_require=extras,
entry_points={
"console_scripts": [