Skip to content

Commit eda0bb5

Browse files
authored
Allow Python 3.9 when the underlying PySpark is 3.1 and above. (#2167)
`PySpark` 3.1 and above now supports Python 3.9. We should add the CI and update the upperbound for Python.
1 parent ee07248 commit eda0bb5

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/master.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,25 @@ jobs:
2020
spark-version: 2.3.4
2121
pandas-version: 0.23.4
2222
pyarrow-version: 0.16.0
23+
numpy-version: 1.18.5
2324
- python-version: 3.6
2425
spark-version: 2.3.4
2526
pandas-version: 0.24.2
2627
pyarrow-version: 0.10.0
28+
numpy-version: 1.19.5
29+
default-index-type: 'distributed-sequence'
30+
- python-version: 3.9
31+
spark-version: 3.1.1
32+
pandas-version: 1.2.4
33+
pyarrow-version: 3.0.0
34+
numpy-version: 1.20.3
2735
default-index-type: 'distributed-sequence'
2836
env:
2937
PYTHON_VERSION: ${{ matrix.python-version }}
3038
SPARK_VERSION: ${{ matrix.spark-version }}
3139
PANDAS_VERSION: ${{ matrix.pandas-version }}
3240
PYARROW_VERSION: ${{ matrix.pyarrow-version }}
41+
NUMPY_VERSION: ${{ matrix.numpy-version }}
3342
DEFAULT_INDEX_TYPE: ${{ matrix.default-index-type }}
3443
KOALAS_TESTING: 1
3544
SPARK_LOCAL_IP: 127.0.0.1
@@ -64,8 +73,10 @@ jobs:
6473
if [[ "$PYTHON_VERSION" < "3.6" ]]; then sed -i '/black/d' requirements-dev.txt; fi
6574
# sphinx-plotly-directive supports Python 3.6+
6675
if [[ "$PYTHON_VERSION" < "3.6" ]]; then sed -i '/sphinx-plotly-directive/d' requirements-dev.txt; fi
76+
# Disable mypy check for PySpark 3.1
77+
if [[ "$SPARK_VERSION" > "3.1" ]]; then sed -i '/mypy/d' requirements-dev.txt; fi
6778
pip install -r requirements-dev.txt
68-
pip install pandas==$PANDAS_VERSION pyarrow==$PYARROW_VERSION pyspark==$SPARK_VERSION
79+
pip install pandas==$PANDAS_VERSION pyarrow==$PYARROW_VERSION pyspark==$SPARK_VERSION numpy==$NUMPY_VERSION
6980
# matplotlib dropped Python 3.5 support from 3.1.x; however, 3.0.3 only supports sphinx 2.x.
7081
# It forces the sphinx version to 2.x.
7182
if [[ "$PYTHON_VERSION" < "3.6" ]]; then pip install "sphinx<3.0.0"; fi

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
'plotly': ['plotly>=4.8'],
5555
'matplotlib': ['matplotlib>=3.0.0,<3.3.0'],
5656
},
57-
python_requires='>=3.5,<3.9',
57+
python_requires='>=3.5,<3.10',
5858
install_requires=[
5959
'pandas>=0.23.2',
6060
'pyarrow>=0.10',
@@ -77,5 +77,6 @@
7777
'Programming Language :: Python :: 3.6',
7878
'Programming Language :: Python :: 3.7',
7979
'Programming Language :: Python :: 3.8',
80+
'Programming Language :: Python :: 3.9',
8081
],
8182
)

0 commit comments

Comments
 (0)