Skip to content

Commit 69451f8

Browse files
CI/TST: update pyarrow pin in windows-3.8 env / fix failing parquet test on windows (#45364) (#45450)
1 parent 1d0630d commit 69451f8

8 files changed

+14
-20
lines changed

ci/deps/actions-38-locale.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ dependencies:
3232
- xlrd
3333
- xlsxwriter
3434
- xlwt
35-
- pyarrow=1.0.1
35+
- pyarrow=4
3636
- pyxlsb

ci/deps/actions-39.yaml

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

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_under2p0
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_under2p0, 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_under2p0, 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_under2p0, 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_under2p0
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_under2p0:
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-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from pandas.compat.pyarrow import (
1717
pa_version_under2p0,
18+
pa_version_under4p0,
1819
pa_version_under5p0,
1920
pa_version_under6p0,
2021
)
@@ -653,10 +654,8 @@ def test_use_nullable_dtypes(self, engine, request):
653654
"float",
654655
pytest.param(
655656
"period[D]",
656-
# Note: I don't know exactly what version the cutoff is;
657-
# On the CI it fails with 1.0.1
658657
marks=pytest.mark.xfail(
659-
pa_version_under2p0,
658+
pa_version_under4p0,
660659
reason="pyarrow uses pandas internal API incorrectly",
661660
),
662661
),
@@ -899,7 +898,7 @@ def test_pyarrow_backed_string_array(self, pa, string_storage):
899898

900899
@td.skip_if_no("pyarrow")
901900
@pytest.mark.xfail(
902-
pa_version_under2p0, reason="pyarrow uses pandas internal API incorrectly"
901+
pa_version_under4p0, reason="pyarrow uses pandas internal API incorrectly"
903902
)
904903
def test_additional_extension_types(self, pa):
905904
# test additional ExtensionArrays that are supported through the

0 commit comments

Comments
 (0)