Skip to content

CI: Setup 3.9 Travis Build #33505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 9, 2020
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ matrix:
fast_finish: true

include:
# In allowed failures
- dist: bionic
python: 3.9-dev
env:
- JOB="3.9-dev" PATTERN="(not slow and not network and not clipboard)"
- env:
- JOB="3.8" ENV_FILE="ci/deps/travis-38.yaml" PATTERN="(not slow and not network and not clipboard)"

Expand All @@ -53,6 +58,11 @@ matrix:
services:
- mysql
- postgresql
allow_failures:
- dist: bionic
python: 3.9-dev
env:
- JOB="3.9-dev" PATTERN="(not slow and not network)"

before_install:
- echo "before_install"
Expand Down Expand Up @@ -83,7 +93,7 @@ install:
script:
- echo "script start"
- echo "$JOB"
- source activate pandas-dev
- if [ "$JOB" != "3.9-dev" ]; then source activate pandas-dev; fi
- ci/run_tests.sh

after_script:
Expand Down
23 changes: 23 additions & 0 deletions ci/build39.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash -e
# Special build for python3.9 until numpy puts its own wheels up

sudo apt-get install build-essential gcc xvfb
pip install --no-deps -U pip wheel setuptools
pip install python-dateutil pytz pytest pytest-xdist hypothesis
pip install cython --pre # https://github.com/cython/cython/issues/3395

# Alternative for getting numpy:
# pip install --pre -f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com/ numpy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these wheels work yet?

git clone https://github.com/numpy/numpy
cd numpy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the wheel instead?
iirc the existing dev build was already changed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried above - but there are no 3.9 wheels available yet on scipy-wheels-night or the old rackcdn url

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm ok

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update when available - tracking in #33948

python setup.py build_ext --inplace
python setup.py install
cd ..
rm -rf numpy

python setup.py build_ext -inplace
python -m pip install --no-build-isolation -e .

python -c "import sys; print(sys.version_info)"
python -c "import pandas as pd"
python -c "import hypothesis"
5 changes: 5 additions & 0 deletions ci/setup_env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/bin/bash -e

if [ "$JOB" == "3.9-dev" ]; then
/bin/bash ci/build39.sh
exit 0
fi

# edit the locale file if needed
if [[ "$(uname)" == "Linux" && -n "$LC_ALL" ]]; then
echo "Adding locale to the first line of pandas/__init__.py"
Expand Down
1 change: 1 addition & 0 deletions pandas/compat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

PY37 = sys.version_info >= (3, 7)
PY38 = sys.version_info >= (3, 8)
PY39 = sys.version_info >= (3, 9)
PYPY = platform.python_implementation() == "PyPy"


Expand Down
5 changes: 3 additions & 2 deletions pandas/tests/scalar/timedelta/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pytest

import pandas as pd
from pandas import NaT, Timedelta, Timestamp, _is_numpy_dev, offsets
from pandas import NaT, Timedelta, Timestamp, _is_numpy_dev, compat, offsets
import pandas._testing as tm
from pandas.core import ops

Expand Down Expand Up @@ -416,7 +416,8 @@ def test_td_div_numeric_scalar(self):
pytest.param(
np.float64("NaN"),
marks=pytest.mark.xfail(
_is_numpy_dev,
# Works on numpy dev only in python 3.9
_is_numpy_dev and not compat.PY39,
raises=RuntimeWarning,
reason="https://github.com/pandas-dev/pandas/issues/31992",
),
Expand Down