Skip to content

Commit 749872f

Browse files
Backport of CI related PRs on 1.4.x (pandas-dev#46559)
1 parent eb27f7b commit 749872f

26 files changed

+165
-84
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
environment:
99
ENV_FILE: ci/deps/circle-38-arm64.yaml
1010
PYTEST_WORKERS: auto
11-
PATTERN: "not slow and not network and not clipboard and not arm_slow"
11+
PATTERN: "not single_cpu and not slow and not network and not clipboard and not arm_slow and not db"
1212
PYTEST_TARGET: "pandas"
1313
steps:
1414
- checkout

.github/workflows/posix.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ jobs:
162162
shell: bash
163163
run: |
164164
# TODO: re-enable cov, its slowing the tests down though
165-
# TODO: Unpin Cython, the new Cython 0.29.26 is causing compilation errors
166-
pip install Cython==0.29.25 numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3
165+
pip install Cython numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 pytest-asyncio>=0.17 hypothesis>=5.5.3
167166
if: ${{ env.IS_PYPY == 'true' }}
168167

169168
- name: Build Pandas

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
4646
. ~/virtualenvs/pandas-dev/bin/activate && \
4747
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
48-
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
48+
pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \
4949
python setup.py build_ext -q -j2 && \
5050
python -m pip install --no-build-isolation -e . && \
5151
pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml"

ci/deps/actions-310-numpydev.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies:
99
- pytest-cov
1010
- pytest-xdist>=1.31
1111
- hypothesis>=5.5.3
12+
- pytest-asyncio>=0.17
1213

1314
# pandas dependencies
1415
- python-dateutil

ci/deps/actions-310.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dependencies:
1111
- pytest-xdist>=1.31
1212
- hypothesis>=5.5.3
1313
- psutil
14+
- pytest-asyncio>=0.17
15+
- boto3
1416

1517
# required dependencies
1618
- python-dateutil
@@ -21,6 +23,7 @@ dependencies:
2123
- beautifulsoup4
2224
- blosc
2325
- bottleneck
26+
- brotlipy
2427
- fastparquet
2528
- fsspec
2629
- html5lib
@@ -39,6 +42,7 @@ dependencies:
3942
- pytables
4043
- pyarrow
4144
- pyreadstat
45+
- python-snappy
4246
- pyxlsb
4347
- s3fs
4448
- scipy

ci/deps/actions-38-downstream_compat.yaml

+6-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ dependencies:
1212
- pytest-xdist>=1.31
1313
- hypothesis>=5.5.3
1414
- psutil
15+
- pytest-asyncio>=0.17
16+
- boto3
1517

1618
# required dependencies
1719
- python-dateutil
@@ -21,6 +23,7 @@ dependencies:
2123
# optional dependencies
2224
- beautifulsoup4
2325
- blosc
26+
- brotlipy
2427
- bottleneck
2528
- fastparquet
2629
- fsspec
@@ -35,10 +38,11 @@ dependencies:
3538
- odfpy
3639
- pandas-gbq
3740
- psycopg2
38-
- pymysql
39-
- pytables
4041
- pyarrow
42+
- pymysql
4143
- pyreadstat
44+
- pytables
45+
- python-snappy
4246
- pyxlsb
4347
- s3fs
4448
- scipy
@@ -52,17 +56,14 @@ dependencies:
5256

5357
# downstream packages
5458
- aiobotocore
55-
- boto3
5659
- botocore
5760
- cftime
5861
- dask
5962
- ipython
6063
- geopandas
61-
- python-snappy
6264
- seaborn
6365
- scikit-learn
6466
- statsmodels
65-
- brotlipy
6667
- coverage
6768
- pandas-datareader
6869
- pyyaml

ci/deps/actions-38-minimum_versions.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ dependencies:
1313
- pytest-xdist>=1.31
1414
- hypothesis>=5.5.3
1515
- psutil
16+
- pytest-asyncio>=0.17
17+
- boto3
1618

1719
# required dependencies
1820
- python-dateutil=2.8.1
@@ -23,6 +25,7 @@ dependencies:
2325
- beautifulsoup4=4.8.2
2426
- blosc=1.20.1
2527
- bottleneck=1.3.1
28+
- brotlipy=0.7.0
2629
- fastparquet=0.4.0
2730
- fsspec=0.7.4
2831
- html5lib=1.1
@@ -37,10 +40,11 @@ dependencies:
3740
- openpyxl=3.0.3
3841
- pandas-gbq=0.14.0
3942
- psycopg2=2.8.4
40-
- pymysql=0.10.1
41-
- pytables=3.6.1
4243
- pyarrow=1.0.1
44+
- pymysql=0.10.1
4345
- pyreadstat=1.1.0
46+
- pytables=3.6.1
47+
- python-snappy=0.6.0
4448
- pyxlsb=1.0.6
4549
- s3fs=0.4.0
4650
- scipy=1.4.1

ci/deps/actions-38.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dependencies:
1111
- pytest-xdist>=1.31
1212
- hypothesis>=5.5.3
1313
- psutil
14+
- pytest-asyncio>=0.17
15+
- boto3
1416

1517
# required dependencies
1618
- python-dateutil
@@ -21,6 +23,7 @@ dependencies:
2123
- beautifulsoup4
2224
- blosc
2325
- bottleneck
26+
- brotlipy
2427
- fastparquet
2528
- fsspec
2629
- html5lib
@@ -34,10 +37,11 @@ dependencies:
3437
- odfpy
3538
- pandas-gbq
3639
- psycopg2
37-
- pymysql
38-
- pytables
3940
- pyarrow
41+
- pymysql
4042
- pyreadstat
43+
- pytables
44+
- python-snappy
4145
- pyxlsb
4246
- s3fs
4347
- scipy

ci/deps/actions-39.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ dependencies:
1111
- pytest-xdist>=1.31
1212
- hypothesis>=5.5.3
1313
- psutil
14+
- pytest-asyncio>=0.17
15+
- boto3
1416

1517
# required dependencies
1618
- python-dateutil
@@ -21,6 +23,7 @@ dependencies:
2123
- beautifulsoup4
2224
- blosc
2325
- bottleneck
26+
- brotlipy
2427
- fastparquet
2528
- fsspec
2629
- html5lib
@@ -35,9 +38,10 @@ dependencies:
3538
- pandas-gbq
3639
- psycopg2
3740
- pymysql
38-
- pytables
3941
- pyarrow
4042
- pyreadstat
43+
- pytables
44+
- python-snappy
4145
- pyxlsb
4246
- s3fs
4347
- scipy

ci/deps/circle-38-arm64.yaml

+42-8
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,52 @@ channels:
44
dependencies:
55
- python=3.8
66

7-
# tools
8-
- cython>=0.29.24
7+
# test dependencies
8+
- cython=0.29.24
99
- pytest>=6.0
10+
- pytest-cov
1011
- pytest-xdist>=1.31
1112
- hypothesis>=5.5.3
13+
- psutil
14+
- pytest-asyncio>=0.17
15+
- boto3
1216

13-
# pandas dependencies
14-
- botocore>=1.11
15-
- flask
16-
- moto
17-
- numpy
17+
# required dependencies
1818
- python-dateutil
19+
- numpy
1920
- pytz
21+
22+
# optional dependencies
23+
- beautifulsoup4
24+
- blosc
25+
- bottleneck
26+
- brotlipy
27+
- fastparquet
28+
- fsspec
29+
- html5lib
30+
- gcsfs
31+
- jinja2
32+
- lxml
33+
- matplotlib
34+
- numba
35+
- numexpr
36+
- openpyxl
37+
- odfpy
38+
- pandas-gbq
39+
- psycopg2
40+
- pyarrow
41+
- pymysql
42+
# Not provided on ARM
43+
#- pyreadstat
44+
- pytables
45+
- python-snappy
46+
- pyxlsb
47+
- s3fs
48+
- scipy
49+
- sqlalchemy
50+
- tabulate
51+
- xarray
52+
- xlrd
53+
- xlsxwriter
54+
- xlwt
2055
- zstandard
21-
- pip

doc/source/getting_started/install.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -410,5 +410,7 @@ Compression
410410
========================= ================== =============================================================
411411
Dependency Minimum Version Notes
412412
========================= ================== =============================================================
413-
Zstandard Zstandard compression
413+
brotli 0.7.0 Brotli compression
414+
python-snappy 0.6.0 Snappy compression
415+
Zstandard 0.15.2 Zstandard compression
414416
========================= ================== =============================================================

environment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dependencies:
6969
- pytest>=6.0
7070
- pytest-cov
7171
- pytest-xdist>=1.31
72-
- pytest-asyncio
72+
- pytest-asyncio>=0.17
7373
- pytest-instafail
7474

7575
# downstream tests

pandas/compat/_optional.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"bs4": "4.8.2",
1414
"blosc": "1.20.1",
1515
"bottleneck": "1.3.1",
16+
"brotli": "0.7.0",
1617
"fastparquet": "0.4.0",
1718
"fsspec": "0.7.4",
1819
"html5lib": "1.1",
@@ -34,6 +35,7 @@
3435
"pyxlsb": "1.0.6",
3536
"s3fs": "0.4.0",
3637
"scipy": "1.4.1",
38+
"snappy": "0.6.0",
3739
"sqlalchemy": "1.4.0",
3840
"tables": "3.6.1",
3941
"tabulate": "0.8.7",
@@ -50,12 +52,14 @@
5052
INSTALL_MAPPING = {
5153
"bs4": "beautifulsoup4",
5254
"bottleneck": "Bottleneck",
55+
"brotli": "brotlipy",
56+
"jinja2": "Jinja2",
5357
"lxml.etree": "lxml",
5458
"odf": "odfpy",
5559
"pandas_gbq": "pandas-gbq",
56-
"tables": "pytables",
60+
"snappy": "python-snappy",
5761
"sqlalchemy": "SQLAlchemy",
58-
"jinja2": "Jinja2",
62+
"tables": "pytables",
5963
}
6064

6165

@@ -66,6 +70,13 @@ def get_version(module: types.ModuleType) -> str:
6670
version = getattr(module, "__VERSION__", None)
6771

6872
if version is None:
73+
if module.__name__ == "brotli":
74+
# brotli doesn't contain attributes to confirm it's version
75+
return ""
76+
if module.__name__ == "snappy":
77+
# snappy doesn't contain attributes to confirm it's version
78+
# See https://github.com/andrix/python-snappy/pull/119
79+
return ""
6980
raise ImportError(f"Can't determine version for {module.__name__}")
7081
if module.__name__ == "psycopg2":
7182
# psycopg2 appends " (dt dec pq3 ext lo64)" to it's version
@@ -141,7 +152,7 @@ def import_optional_dependency(
141152
minimum_version = min_version if min_version is not None else VERSIONS.get(parent)
142153
if minimum_version:
143154
version = get_version(module_to_get)
144-
if Version(version) < Version(minimum_version):
155+
if version and Version(version) < Version(minimum_version):
145156
msg = (
146157
f"Pandas requires version '{minimum_version}' or newer of '{parent}' "
147158
f"(version '{version}' currently installed)."

pandas/tests/arrays/string_/test_string.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def test_memory_usage(dtype):
504504
# GH 33963
505505

506506
if dtype.storage == "pyarrow":
507-
pytest.skip("not applicable")
507+
pytest.skip(f"not applicable for {dtype.storage}")
508508

509509
series = pd.Series(["a", "b", "c"], dtype=dtype)
510510

pandas/tests/extension/arrow/test_bool.py

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import numpy as np
22
import pytest
33

4+
from pandas.compat import (
5+
is_ci_environment,
6+
is_platform_windows,
7+
)
8+
49
import pandas as pd
510
import pandas._testing as tm
611
from pandas.api.types import is_bool_dtype
@@ -91,6 +96,10 @@ def test_reduce_series_boolean(self):
9196
pass
9297

9398

99+
@pytest.mark.skipif(
100+
is_ci_environment() and is_platform_windows(),
101+
reason="Causes stack overflow on Windows CI",
102+
)
94103
class TestReduceBoolean(base.BaseBooleanReduceTests):
95104
pass
96105

pandas/tests/extension/base/ops.py

+11-6
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,22 @@ def test_add_series_with_extension_array(self, data):
114114
self.assert_series_equal(result, expected)
115115

116116
@pytest.mark.parametrize("box", [pd.Series, pd.DataFrame])
117-
def test_direct_arith_with_ndframe_returns_not_implemented(self, data, box):
117+
def test_direct_arith_with_ndframe_returns_not_implemented(
118+
self, request, data, box
119+
):
118120
# EAs should return NotImplemented for ops with Series/DataFrame
119121
# Pandas takes care of unboxing the series and calling the EA's op.
120122
other = pd.Series(data)
121123
if box is pd.DataFrame:
122124
other = other.to_frame()
123-
if hasattr(data, "__add__"):
124-
result = data.__add__(other)
125-
assert result is NotImplemented
126-
else:
127-
raise pytest.skip(f"{type(data).__name__} does not implement add")
125+
if not hasattr(data, "__add__"):
126+
request.node.add_marker(
127+
pytest.mark.xfail(
128+
reason=f"{type(data).__name__} does not implement add"
129+
)
130+
)
131+
result = data.__add__(other)
132+
assert result is NotImplemented
128133

129134

130135
class BaseComparisonOpsTests(BaseOpsUtil):

0 commit comments

Comments
 (0)