Skip to content

Restore CI after PY2 drop #25752

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 13 commits into from
Mar 24, 2019
12 changes: 12 additions & 0 deletions ci/azure/posix.yml
Original file line number Diff line number Diff line change
@@ -15,6 +15,18 @@ jobs:
PATTERN: "not slow and not network"

${{ if eq(parameters.name, 'Linux') }}:
py35_compat:
ENV_FILE: ci/deps/azure-35-compat.yaml
CONDA_PY: "35"
PATTERN: "not slow and not network"

py36_locale_slow_old_np:
ENV_FILE: ci/deps/azure-36-locale.yaml
CONDA_PY: "36"
PATTERN: "slow"
LOCALE_OVERRIDE: "zh_CN.UTF-8"
EXTRA_APT: "language-pack-zh-hans"

py36_locale_slow:
ENV_FILE: ci/deps/azure-36-locale_slow.yaml
CONDA_PY: "36"
4 changes: 4 additions & 0 deletions ci/azure/windows.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,10 @@ jobs:
ENV_FILE: ci/deps/azure-windows-36.yaml
CONDA_PY: "36"

py37_np141:
ENV_FILE: ci/deps/azure-windows-37.yaml
CONDA_PY: "37"

steps:
- task: CondaEnvironment@1
inputs:
29 changes: 29 additions & 0 deletions ci/deps/azure-35-compat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pandas-dev
channels:
- defaults
- conda-forge
dependencies:
- beautifulsoup4==4.4.1
- bottleneck=1.2.0
- cython=0.28.2
- hypothesis>=3.58.0
- jinja2=2.8
- numexpr=2.6.1
- numpy=1.12.0
- openpyxl=2.4.0
- pytables=3.4.2
- python-dateutil=2.5.0
- python=3.5*
- pytz=2015.4
- scipy=0.18.1
- xlrd=1.0.0
- xlsxwriter=0.7.7
- xlwt=1.0.0
# universal
- pytest-xdist
- pytest-mock
- isort
- pip:
# for python 3.5, pytest>=4.0.2 is not available in conda
- pytest>=4.0.2
- html5lib==1.0b2
29 changes: 29 additions & 0 deletions ci/deps/azure-36-locale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pandas-dev
channels:
- defaults
- conda-forge
dependencies:
- beautifulsoup4==4.5.1
- bottleneck=1.2.0
- cython=0.28.2
- lxml
- matplotlib=2.0.0
- numpy=1.12.0
- openpyxl=2.4.0
- python-dateutil
- python-blosc
- python=3.6
- pytz=2016.10
- scipy
- sqlalchemy=1.1.4
- xlrd=1.0.0
- xlsxwriter=0.9.4
- xlwt=1.2.0
# universal
- pytest>=4.0.2
- pytest-xdist
- pytest-mock
- hypothesis>=3.58.0
- isort
- pip:
- html5lib==1.0b2
2 changes: 1 addition & 1 deletion ci/deps/azure-macos-35.yaml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ dependencies:
- nomkl
- numexpr
- numpy=1.12.0
- openpyxl=2.5.5
- openpyxl
- pyarrow
- pytables
- python=3.5*
33 changes: 33 additions & 0 deletions ci/deps/azure-windows-37.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: pandas-dev
channels:
- defaults
- conda-forge
dependencies:
- beautifulsoup4
- bottleneck
- gcsfs
- html5lib
- jinja2
- lxml
- matplotlib=3.0.1
- numexpr
- numpy=1.14.*
- openpyxl
- pytables
- python=3.7.*
- python-dateutil
- pytz
- s3fs
- scipy
- sqlalchemy
- xlrd
- xlsxwriter
- xlwt
# universal
- cython>=0.28.2
- pytest>=4.0.2
- pytest-xdist
- pytest-mock
- moto
- hypothesis>=3.58.0
- isort
2 changes: 1 addition & 1 deletion ci/deps/travis-36-locale.yaml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ dependencies:
- numpy
- openpyxl
- psycopg2
- pymysql
- pymysql=0.7.9
- pytables
- python-dateutil
- python=3.6*
2 changes: 1 addition & 1 deletion doc/source/install.rst
Original file line number Diff line number Diff line change
@@ -259,7 +259,7 @@ Optional Dependencies
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage, Version 3.4.2 or higher
* `pyarrow <http://arrow.apache.org/docs/python/>`__ (>= 0.9.0): necessary for feather-based storage.
* `Apache Parquet <https://parquet.apache.org/>`__, either `pyarrow <http://arrow.apache.org/docs/python/>`__ (>= 0.7.0) or `fastparquet <https://fastparquet.readthedocs.io/en/latest>`__ (>= 0.2.1) for parquet-based storage. The `snappy <https://pypi.org/project/python-snappy>`__ and `brotli <https://pypi.org/project/brotlipy>`__ are available for compression support.
* `SQLAlchemy <http://www.sqlalchemy.org>`__: for SQL database support. Version 1.0.8 or higher recommended. Besides SQLAlchemy, you also need a database specific driver. You can find an overview of supported drivers for each SQL dialect in the `SQLAlchemy docs <http://docs.sqlalchemy.org/en/latest/dialects/index.html>`__. Some common drivers are:
* `SQLAlchemy <http://www.sqlalchemy.org>`__: for SQL database support. Version 1.1.4 or higher recommended. Besides SQLAlchemy, you also need a database specific driver. You can find an overview of supported drivers for each SQL dialect in the `SQLAlchemy docs <http://docs.sqlalchemy.org/en/latest/dialects/index.html>`__. Some common drivers are:

* `psycopg2 <http://initd.org/psycopg/>`__: for PostgreSQL
* `pymysql <https://github.com/PyMySQL/PyMySQL>`__: for MySQL.
6 changes: 3 additions & 3 deletions doc/source/whatsnew/v0.25.0.rst
Original file line number Diff line number Diff line change
@@ -123,13 +123,13 @@ If installed, we now require:
+=================+=================+==========+
| beautifulsoup4 | 4.4.1 | |
+-----------------+-----------------+----------+
| openpyxl | 2.2.6 | |
| openpyxl | 2.4.0 | |
+-----------------+-----------------+----------+
| pymysql | 0.6.6 | |
| pymysql | 0.7.9 | |
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't actually require these versions for sqlalchemy / pymsql, they are just the recommended ones. So may want to re-word this (can do in a followup). We are don't actually reject an earlier version.

+-----------------+-----------------+----------+
| pytz | 2015.4 | |
+-----------------+-----------------+----------+
| sqlalchemy | 1.0.8 | |
| sqlalchemy | 1.1.4 | |
+-----------------+-----------------+----------+
| xlsxwriter | 0.7.7 | |
+-----------------+-----------------+----------+
10 changes: 6 additions & 4 deletions pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
import pandas as pd
from pandas import (
Categorical, CategoricalIndex, DatetimeIndex, Index, IntervalIndex, Series,
Timestamp, compat)
Timestamp, _np_version_under1p14, compat)
import pandas.core.algorithms as algos
from pandas.core.arrays import DatetimeArray
import pandas.core.common as com
@@ -228,9 +228,11 @@ def test_complex_sorting(self):
# gh 12666 - check no segfault
x17 = np.array([complex(i) for i in range(17)], dtype=object)

msg = (r"'(<|>)' not supported between instances of 'complex' and"
r" 'complex'|"
r"unorderable types: complex\(\) > complex\(\)")
msg = (r"unorderable types: {0} [<>] {0}".format(r"complex\(\)")
if _np_version_under1p14 else
r"'[<>]' not supported between instances of {0} and {0}".format(
"'complex'")
)
with pytest.raises(TypeError, match=msg):
algos.factorize(x17[::-1], sort=True)

14 changes: 9 additions & 5 deletions pandas/tests/test_sorting.py
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@
import pytest

from pandas import (
DataFrame, MultiIndex, Series, compat, concat, merge, to_datetime)
DataFrame, MultiIndex, Series, _np_version_under1p14, compat, concat,
merge, to_datetime)
from pandas.core import common as com
from pandas.core.sorting import (
decons_group_index, get_group_index, is_int64_overflow_possible,
@@ -413,10 +414,13 @@ def test_mixed_integer_from_list(self):
def test_unsortable(self):
# GH 13714
arr = np.array([1, 2, datetime.now(), 0, 3], dtype=object)
msg = (r"'(<|>)' not supported between instances of ('"
r"datetime\.datetime' and 'int'|'int' and 'datetime\.datetime"
r"')|"
r"unorderable types: int\(\) > datetime\.datetime\(\)")
msg = (r"unorderable types: ({0} [<>] {1}|{1} [<>] {0})".format(
r"int\(\)", r"datetime\.datetime\(\)") # noqa: E126
if _np_version_under1p14 else
(r"'[<>]' not supported between instances of "
r"({0} and {1}|{1} and {0})").format(
"'int'", r"'datetime\.datetime'")
)
with pytest.raises(TypeError, match=msg):
safe_sort(arr)