Skip to content

Commit e596ded

Browse files
Backport PR #42999: TST: Fix test related to reverting fastparquet nullable support (#43027)
Co-authored-by: Thomas Li <[email protected]>
1 parent 3608e3a commit e596ded

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

Diff for: pandas/io/parquet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def read(
311311
):
312312
parquet_kwargs: dict[str, Any] = {}
313313
use_nullable_dtypes = kwargs.pop("use_nullable_dtypes", False)
314-
if Version(self.api.__version__) >= Version("0.7.1"):
314+
if Version(self.api.__version__) >= Version("0.7.0"):
315315
# We are disabling nullable dtypes for fastparquet pending discussion
316316
parquet_kwargs["pandas_nulls"] = False
317317
if use_nullable_dtypes:

Diff for: pandas/tests/io/test_parquet.py

-5
Original file line numberDiff line numberDiff line change
@@ -1066,11 +1066,6 @@ def test_timezone_aware_index(self, fp, timezone_aware_date_list):
10661066
def test_use_nullable_dtypes_not_supported(self, monkeypatch, fp):
10671067
df = pd.DataFrame({"a": [1, 2]})
10681068

1069-
# This is supported now in fastparquet 0.7.1 and above actually
1070-
# Still need to ensure that this raises in all versions below
1071-
import fastparquet as fp
1072-
1073-
monkeypatch.setattr(fp, "__version__", "0.4")
10741069
with tm.ensure_clean() as path:
10751070
df.to_parquet(path)
10761071
with pytest.raises(ValueError, match="not supported for the fastparquet"):

0 commit comments

Comments
 (0)