From 93119ecb5396890a89e744ee0458364e8872f6a4 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 12 Apr 2020 21:28:21 +0100 Subject: [PATCH 01/11] Python 3.9 build --- .travis.yml | 6 +++++- ci/build39.sh | 25 +++++++++++++++++++++++++ ci/setup_env.sh | 5 +++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 ci/build39.sh diff --git a/.travis.yml b/.travis.yml index 2c8533d02ddc1..e4cb97661497a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,6 +53,10 @@ matrix: services: - mysql - postgresql + allow_failures: + python: 3.9-dev + env: + - JOB="3.9-dev" PATTERN="(not slow and not network)" before_install: - echo "before_install" @@ -83,7 +87,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: diff --git a/ci/build39.sh b/ci/build39.sh new file mode 100755 index 0000000000000..37e5a8a630b17 --- /dev/null +++ b/ci/build39.sh @@ -0,0 +1,25 @@ +#!/bin/bash -e +# Special build for python3.8 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 cython pytest pytest-xdist hypothesis + +# Possible alternative for getting numpy: +# pip install --pre -f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com/ numpy +git clone https://github.com/numpy/numpy +cd numpy +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" + +# TODO: Is there anything else in setup_env that we really want to do? +# ci/setup_env.sh \ No newline at end of file diff --git a/ci/setup_env.sh b/ci/setup_env.sh index ae39b0dda5d09..97c7a86867c44 100755 --- a/ci/setup_env.sh +++ b/ci/setup_env.sh @@ -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" From e3974d6e7d1526677f224bb0c48d2c667549909c Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 12 Apr 2020 21:52:13 +0100 Subject: [PATCH 02/11] Python 3.9 build --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e4cb97661497a..ab26c9f60cb91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -54,8 +54,9 @@ matrix: - mysql - postgresql allow_failures: + - dist: bionic python: 3.9-dev - env: + env: - JOB="3.9-dev" PATTERN="(not slow and not network)" before_install: From 5bc23f9c33f5a0ada3bee8d8193be73698581348 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 12 Apr 2020 21:59:24 +0100 Subject: [PATCH 03/11] Python 3.9 build --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index ab26c9f60cb91..374dcdd6bc39d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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)" - env: - JOB="3.8" ENV_FILE="ci/deps/travis-38.yaml" PATTERN="(not slow and not network and not clipboard)" From b58003986f672a0c5cfc3b0ab1516c17226ca9c3 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Mon, 13 Apr 2020 02:03:02 +0100 Subject: [PATCH 04/11] Python 3.9 build --- ci/build39.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/build39.sh b/ci/build39.sh index 37e5a8a630b17..ffd504bbfc0f7 100755 --- a/ci/build39.sh +++ b/ci/build39.sh @@ -3,7 +3,8 @@ sudo apt-get install build-essential gcc xvfb pip install --no-deps -U pip wheel setuptools -pip install python-dateutil pytz cython pytest pytest-xdist hypothesis +pip install python-dateutil pytz pytest pytest-xdist hypothesis +pip install cython --pre # https://github.com/cython/cython/issues/3395 # Possible alternative for getting numpy: # pip install --pre -f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com/ numpy From 26e2642f9575ae73786c507fd0416695595abfcc Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Thu, 23 Apr 2020 23:45:04 +0100 Subject: [PATCH 05/11] Update build39.sh minor comments --- ci/build39.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ci/build39.sh b/ci/build39.sh index ffd504bbfc0f7..907948b30fb84 100755 --- a/ci/build39.sh +++ b/ci/build39.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -# Special build for python3.8 until numpy puts its own wheels up +# 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 @@ -21,6 +21,3 @@ 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" - -# TODO: Is there anything else in setup_env that we really want to do? -# ci/setup_env.sh \ No newline at end of file From 75ef91ada4428bd6a23af52cd89135efa27a1f64 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Thu, 30 Apr 2020 01:27:12 +0100 Subject: [PATCH 06/11] Update .travis.yml Skip clipboard tests --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 374dcdd6bc39d..98826a2d9e115 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ matrix: - dist: bionic python: 3.9-dev env: - - JOB="3.9-dev" PATTERN="(not slow and not network)" + - 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)" From 7ff552f2524aeee6414de65d3b88e238b0f04338 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sat, 2 May 2020 00:56:10 +0100 Subject: [PATCH 07/11] Python 3.9 tests --- pandas/compat/__init__.py | 1 + pandas/tests/scalar/timedelta/test_arithmetic.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pandas/compat/__init__.py b/pandas/compat/__init__.py index 6570e0782a69a..f7bb73b916ce0 100644 --- a/pandas/compat/__init__.py +++ b/pandas/compat/__init__.py @@ -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" diff --git a/pandas/tests/scalar/timedelta/test_arithmetic.py b/pandas/tests/scalar/timedelta/test_arithmetic.py index 17d6edfd17de8..a1137bc1409a5 100644 --- a/pandas/tests/scalar/timedelta/test_arithmetic.py +++ b/pandas/tests/scalar/timedelta/test_arithmetic.py @@ -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 @@ -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", ), From 6dc732253f6aeae69aff41243591608891f9d85f Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sat, 2 May 2020 11:12:35 +0100 Subject: [PATCH 08/11] Dummy commit --- ci/build39.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build39.sh b/ci/build39.sh index 907948b30fb84..5979a233c36ae 100755 --- a/ci/build39.sh +++ b/ci/build39.sh @@ -6,7 +6,7 @@ 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 -# Possible alternative for getting numpy: +# Alternative for getting numpy: # pip install --pre -f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com/ numpy git clone https://github.com/numpy/numpy cd numpy From aaa835f98c02bfcafc7a7d1474e2c0f4cd8b0406 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 3 May 2020 00:05:50 +0100 Subject: [PATCH 09/11] Use numpy master manylinux wheel --- ci/build39.sh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ci/build39.sh b/ci/build39.sh index 5979a233c36ae..8dd143ab9d168 100755 --- a/ci/build39.sh +++ b/ci/build39.sh @@ -6,14 +6,7 @@ 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 -git clone https://github.com/numpy/numpy -cd numpy -python setup.py build_ext --inplace -python setup.py install -cd .. -rm -rf numpy +pip install --pre -f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com numpy python setup.py build_ext -inplace python -m pip install --no-build-isolation -e . From b7b74c58c90637208badc47aca58bcdfa9a21f65 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 3 May 2020 23:59:54 +0100 Subject: [PATCH 10/11] use scipy nightly wheels --- ci/build39.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/build39.sh b/ci/build39.sh index 8dd143ab9d168..4ab35fc2ea6af 100755 --- a/ci/build39.sh +++ b/ci/build39.sh @@ -6,7 +6,7 @@ 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 -pip install --pre -f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com numpy +pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy python setup.py build_ext -inplace python -m pip install --no-build-isolation -e . From 21cce3fe09ce977279c4b3af73f50f800a9a7976 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Mon, 4 May 2020 23:48:00 +0100 Subject: [PATCH 11/11] Build numpy from source --- ci/build39.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/build39.sh b/ci/build39.sh index 4ab35fc2ea6af..f85e1c7def206 100755 --- a/ci/build39.sh +++ b/ci/build39.sh @@ -6,7 +6,12 @@ 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 -pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy +git clone https://github.com/numpy/numpy +cd numpy +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 .