Skip to content

Commit 91f12c4

Browse files
CI/TST: update pyarrow pin in windows-3.8 env / fix failing parquet test on windows (#45364)
1 parent 21b7daf commit 91f12c4

9 files changed

+15
-22
lines changed

ci/deps/actions-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies:
3636
- psycopg2
3737
- pymysql
3838
- pytables
39-
- pyarrow
39+
- pyarrow=3
4040
- pyreadstat
4141
- pyxlsb
4242
- s3fs

ci/deps/actions-39.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies:
3636
- psycopg2
3737
- pymysql
3838
- pytables
39-
- pyarrow
39+
- pyarrow=5
4040
- pyreadstat
4141
- pyxlsb
4242
- s3fs

ci/deps/azure-macos-39.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies:
2323
- numexpr
2424
- numpy=1.21.3
2525
- openpyxl
26-
- pyarrow=1.0.1
26+
- pyarrow=4
2727
- pyreadstat
2828
- pytables
2929
- python-dateutil==2.8.1

ci/deps/azure-windows-38.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies:
2323
- numpy=1.18
2424
- openpyxl
2525
- jinja2
26-
- pyarrow=1.0.1
26+
- pyarrow=2
2727
- pytables
2828
- python-dateutil
2929
- pytz

ci/deps/azure-windows-39.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ dependencies:
2525
- numexpr
2626
- numpy
2727
- openpyxl
28-
- pyarrow
28+
- pyarrow=6
2929
- pytables
3030
- python-dateutil
3131
- pytz

pandas/tests/arrays/period/test_arrow_compat.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pytest
22

3-
from pandas.compat import pa_version_under3p0
3+
from pandas.compat import pa_version_under4p0
44

55
from pandas.core.dtypes.dtypes import PeriodDtype
66

@@ -72,7 +72,7 @@ def test_arrow_array_missing():
7272

7373

7474
@pytest.mark.xfail(
75-
pa_version_under3p0, reason="pyarrow incorrectly uses pandas internals API"
75+
pa_version_under4p0, reason="pyarrow incorrectly uses pandas internals API"
7676
)
7777
def test_arrow_table_roundtrip():
7878
from pandas.core.arrays._arrow_utils import ArrowPeriodType
@@ -94,7 +94,7 @@ def test_arrow_table_roundtrip():
9494

9595

9696
@pytest.mark.xfail(
97-
pa_version_under3p0, reason="pyarrow incorrectly uses pandas internals API"
97+
pa_version_under4p0, reason="pyarrow incorrectly uses pandas internals API"
9898
)
9999
def test_arrow_load_from_zero_chunks():
100100
# GH-41040
@@ -115,7 +115,7 @@ def test_arrow_load_from_zero_chunks():
115115

116116

117117
@pytest.mark.xfail(
118-
pa_version_under3p0, reason="pyarrow incorrectly uses pandas internals API"
118+
pa_version_under4p0, reason="pyarrow incorrectly uses pandas internals API"
119119
)
120120
def test_arrow_table_roundtrip_without_metadata():
121121
arr = PeriodArray([1, 2, 3], freq="H")

pandas/tests/io/test_feather.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import numpy as np
33
import pytest
44

5-
from pandas.compat.pyarrow import pa_version_under3p0
5+
from pandas.compat.pyarrow import pa_version_under4p0
66

77
import pandas as pd
88
import pandas._testing as tm
@@ -87,7 +87,7 @@ def test_basic(self):
8787
),
8888
}
8989
)
90-
if not pa_version_under3p0:
90+
if not pa_version_under4p0:
9191
# older pyarrow incorrectly uses pandas internal API, so
9292
# constructs invalid Block
9393
df["periods"] = pd.period_range("2013", freq="M", periods=3)

pandas/tests/io/test_fsspec.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import io
2-
import sys
32

43
import numpy as np
54
import pytest
65

7-
from pandas.compat import is_platform_windows
86
from pandas.compat._optional import VERSIONS
97

108
from pandas import (
@@ -162,10 +160,7 @@ def test_to_parquet_new_file(monkeypatch, cleared_fs):
162160
)
163161

164162

165-
@td.skip_if_no("pyarrow")
166-
@pytest.mark.xfail(
167-
is_platform_windows() and sys.version_info[:2] == (3, 8), reason="GH 45344"
168-
)
163+
@td.skip_if_no("pyarrow", min_version="2")
169164
def test_arrowparquet_options(fsspectest):
170165
"""Regression test for writing to a not-yet-existent GCS Parquet file."""
171166
df = DataFrame({"a": [0]})

pandas/tests/io/test_parquet.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from pandas.compat.pyarrow import (
1717
pa_version_under2p0,
18-
pa_version_under3p0,
18+
pa_version_under4p0,
1919
pa_version_under5p0,
2020
pa_version_under6p0,
2121
)
@@ -654,10 +654,8 @@ def test_use_nullable_dtypes(self, engine, request):
654654
"float",
655655
pytest.param(
656656
"period[D]",
657-
# Note: I don't know exactly what version the cutoff is;
658-
# On the CI it fails with 1.0.1 & 2.0.0
659657
marks=pytest.mark.xfail(
660-
pa_version_under3p0,
658+
pa_version_under4p0,
661659
reason="pyarrow uses pandas internal API incorrectly",
662660
),
663661
),
@@ -900,7 +898,7 @@ def test_pyarrow_backed_string_array(self, pa, string_storage):
900898

901899
@td.skip_if_no("pyarrow")
902900
@pytest.mark.xfail(
903-
pa_version_under3p0, reason="pyarrow uses pandas internal API incorrectly"
901+
pa_version_under4p0, reason="pyarrow uses pandas internal API incorrectly"
904902
)
905903
def test_additional_extension_types(self, pa):
906904
# test additional ExtensionArrays that are supported through the

0 commit comments

Comments
 (0)