Skip to content
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

[backport 2.3.x] CI: update fastparquet xfails for new release (#60337) #60344

Merged
merged 3 commits into from
Nov 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions pandas/tests/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1223,11 +1223,17 @@ def test_duplicate_columns(self, fp):
msg = "Cannot create parquet dataset with duplicate column names"
self.check_error_on_write(df, fp, ValueError, msg)

@pytest.mark.xfail(
Version(np.__version__) >= Version("2.0.0"),
reason="fastparquet uses np.float_ in numpy2",
)
def test_bool_with_none(self, fp):
def test_bool_with_none(self, fp, request):
import fastparquet

if Version(fastparquet.__version__) < Version("2024.11.0") and Version(
np.__version__
) >= Version("2.0.0"):
request.applymarker(
pytest.mark.xfail(
reason=("fastparquet uses np.float_ in numpy2"),
)
)
df = pd.DataFrame({"a": [True, None, False]})
expected = pd.DataFrame({"a": [1.0, np.nan, 0.0]}, dtype="float16")
# Fastparquet bug in 0.7.1 makes it so that this dtype becomes
Expand Down Expand Up @@ -1342,12 +1348,21 @@ def test_empty_dataframe(self, fp):
expected = df.copy()
check_round_trip(df, fp, expected=expected)

@pytest.mark.xfail(
_HAVE_FASTPARQUET and Version(fastparquet.__version__) > Version("2022.12"),
reason="fastparquet bug, see https://github.com/dask/fastparquet/issues/929",
)
@pytest.mark.skipif(using_copy_on_write(), reason="fastparquet writes into Index")
def test_timezone_aware_index(self, fp, timezone_aware_date_list):
def test_timezone_aware_index(self, fp, timezone_aware_date_list, request):
import fastparquet

if Version(fastparquet.__version__) > Version("2022.12") and Version(
fastparquet.__version__
) < Version("2024.11.0"):
request.applymarker(
pytest.mark.xfail(
reason=(
"fastparquet bug, see "
"https://github.com/dask/fastparquet/issues/929"
),
)
)

idx = 5 * [timezone_aware_date_list]

df = pd.DataFrame(index=idx, data={"index_as_col": idx})
Expand Down
Loading