Skip to content
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3bbeea2
TST: Add test for writing UUIDs to parquet with pyarrow #61602
GiTaDi-CrEaTe May 15, 2026
88d4e28
TST: Fix read_parquet namespace usage
GiTaDi-CrEaTe May 15, 2026
9d98157
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 15, 2026
5f4d739
TST: Address reviewer feedback for UUID pyarrow test
GiTaDi-CrEaTe May 15, 2026
b2f9c8b
Merge branch 'main' into tests/io-parquet-uuid-61602
GiTaDi-CrEaTe May 15, 2026
72dc35a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 15, 2026
c53e34c
TST: Implement reviewer feedback and fix formatting
GiTaDi-CrEaTe May 15, 2026
6b7b57f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 15, 2026
1f36ae7
Merge branch 'main' into tests/io-parquet-uuid-61602
GiTaDi-CrEaTe May 16, 2026
e699965
TST: Handle raw bytes fallback for UUIDs on PyArrow nightly/py314
GiTaDi-CrEaTe May 16, 2026
f4f3e4e
Merge branch 'main' into tests/io-parquet-uuid-61602
GiTaDi-CrEaTe May 16, 2026
91f481c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 16, 2026
6332052
TST: Fix line length in comment to pass ruff
GiTaDi-CrEaTe May 16, 2026
8925886
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 16, 2026
0139402
TST: Use temp_file fixture instead of tmp_path
GiTaDi-CrEaTe May 17, 2026
9053a75
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 17, 2026
bdd3ae3
TST: Replace UUID byte fallback with pytest.xfail for upstream bug
GiTaDi-CrEaTe May 17, 2026
b244666
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 17, 2026
764647b
TST: Refactor dynamic xfail to use request.node.add_marker
GiTaDi-CrEaTe May 17, 2026
9fe4745
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 17, 2026
07ccaef
TST: Shorten xfail reason string to pass ruff line length
GiTaDi-CrEaTe May 17, 2026
8733d2c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 17, 2026
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
22 changes: 22 additions & 0 deletions pandas/tests/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from io import BytesIO
import os
import pathlib
import uuid

import numpy as np
import pytest
Expand All @@ -20,6 +21,7 @@
pa_version_under20p0,
)
from pandas.errors import Pandas4Warning
import pandas.util._test_decorators as td

import pandas as pd
import pandas._testing as tm
Expand Down Expand Up @@ -1521,3 +1523,23 @@ def test_invalid_dtype_backend(self, engine, temp_file):
df.to_parquet(temp_file)
with pytest.raises(ValueError, match=msg):
read_parquet(temp_file, dtype_backend="numpy")


@td.skip_if_no("pyarrow", min_version="24.0")
def test_to_parquet_uuid_supported(temp_file, request):
# GH 61602
df = pd.DataFrame({"id": [uuid.uuid4(), uuid.uuid4()]})

df.to_parquet(temp_file, engine="pyarrow")
result = read_parquet(temp_file, engine="pyarrow")

# If upstream PyArrow nightly/py314 returns raw bytes instead of UUIDs,
# we dynamically add the xfail marker to satisfy both Ruff and Pandas architecture.
if len(result) > 0 and isinstance(result.loc[0, "id"], bytes):
request.node.add_marker(
pytest.mark.xfail(
reason="PyArrow nightly bug: returns raw bytes instead of UUIDs"
)
)

tm.assert_frame_equal(result, df)
Loading