Skip to content

Commit

Permalink
Add support for Python 3.9 (#307)
Browse files Browse the repository at this point in the history
* Add support for Python 3.9

* use conda-forge channel when creating conda envs

currently, python 3.9 is only available of conda-forge

* Update .travis.yml

* fix pandera-core env installation

* add pylint disable exception for python 3.9

* fix unit test: use `set` instead of set literal

* remove python 3.9, pandas 0.25.3 from travis ci

- python 3.9 doesn't support pandas 0.25.3

Co-authored-by: Niels Bantilan <niels.bantilan@gmail.com>
  • Loading branch information
m1so and cosmicBboy committed Nov 14, 2020
1 parent 2e2c5d7 commit 31fe07b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ env:
- PYTHON_VERSION=3.6 ENV_FILE=ci/environment_pandas_latest.yml
- PYTHON_VERSION=3.7 ENV_FILE=ci/environment_pandas_latest.yml
- PYTHON_VERSION=3.8 ENV_FILE=ci/environment_pandas_latest.yml
- PYTHON_VERSION=3.9 ENV_FILE=ci/environment_pandas_latest.yml
- PYTHON_VERSION=3.6 ENV_FILE=ci/environment_pandas_0_25_3.yml
- PYTHON_VERSION=3.7 ENV_FILE=ci/environment_pandas_0_25_3.yml
- PYTHON_VERSION=3.8 ENV_FILE=ci/environment_pandas_0_25_3.yml
Expand Down Expand Up @@ -74,7 +75,8 @@ install:
- |
conda create -n pandera python=$PYTHON_VERSION || exit 1
conda env update -n pandera -f $ENV_FILE
conda create -n pandera-core python=$PYTHON_VERSION pytest
conda create -n pandera-core python=$PYTHON_VERSION || exit 1
conda env update -n pandera-core -f $ENV_FILE
conda list
- source activate pandera && pip install .[all]
- source activate pandera-core && pip install .
Expand All @@ -91,7 +93,13 @@ script:
- isort --line-length=79 --check-only pandera tests
- black --line-length=79 --check pandera tests
# Linting
- pylint pandera tests
- |
if [ "${PYTHON_VERSION}" == "3.9" ]; then
# https://github.com/PyCQA/pylint/issues/776
pylint pandera tests --disable=unsubscriptable-object
else
pylint pandera tests
fi
# Type checking
- mypy pandera tests
# Tests
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Scientific/Engineering'
],

Expand Down

0 comments on commit 31fe07b

Please sign in to comment.