Skip to content

Commit 4770282

Browse files
CI: tmp avoid pandas nightly in nightly-deps test build (#608)
1 parent 8e0483d commit 4770282

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

ci/envs/nightly-deps.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ channels:
55
dependencies:
66
- libgdal-core
77
- pytest
8+
- pandas
89
- pip
910
- pip:
1011
- --pre --prefer-binary --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --extra-index-url https://pypi.fury.io/arrow-nightlies/ --extra-index-url https://pypi.org/simple
1112
- geopandas
1213
- numpy>=2.0.0.dev
1314
- shapely
14-
- pandas
15+
# - pandas
1516
- pyarrow

pyogrio/_compat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
PANDAS_GE_15 = pandas is not None and Version(pandas.__version__) >= Version("1.5.0")
4242
PANDAS_GE_20 = pandas is not None and Version(pandas.__version__) >= Version("2.0.0")
4343
PANDAS_GE_22 = pandas is not None and Version(pandas.__version__) >= Version("2.2.0")
44+
PANDAS_GE_23 = pandas is not None and Version(pandas.__version__) >= Version("2.3.0")
4445
PANDAS_GE_30 = pandas is not None and Version(pandas.__version__) >= Version("3.0.0dev")
4546

4647
GDAL_GE_37 = __gdal_version__ >= (3, 7, 0)

pyogrio/tests/test_geopandas_io.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
HAS_ARROW_WRITE_API,
2424
HAS_PYPROJ,
2525
PANDAS_GE_15,
26+
PANDAS_GE_23,
2627
PANDAS_GE_30,
2728
SHAPELY_GE_21,
2829
)
@@ -1470,7 +1471,9 @@ def test_write_None_string_column(tmp_path, use_arrow):
14701471
assert filename.exists()
14711472

14721473
result_gdf = read_dataframe(filename, use_arrow=use_arrow)
1473-
if PANDAS_GE_30 and use_arrow:
1474+
if (
1475+
PANDAS_GE_30 or (PANDAS_GE_23 and pd.options.future.infer_string)
1476+
) and use_arrow:
14741477
assert result_gdf.object_col.dtype == "str"
14751478
gdf["object_col"] = gdf["object_col"].astype("str")
14761479
else:

0 commit comments

Comments
 (0)