public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pyogrio] rawhide: Backport fix for test failure with gdal-3.14+
@ 2026-06-19 14:10 Sandro Mani
  0 siblings, 0 replies; only message in thread
From: Sandro Mani @ 2026-06-19 14:10 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-pyogrio
Branch : rawhide
Commit : 9e5ef41b3c57a42e8d19f204b8f46bcd025ef0da
Author : Sandro Mani <manisandro@gmail.com>
Date   : 2026-06-19T16:10:01+02:00
Stats  : +61/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/python-pyogrio/c/9e5ef41b3c57a42e8d19f204b8f46bcd025ef0da?branch=rawhide

Log:
Backport fix for test failure with gdal-3.14+

---
diff --git a/06d9b61cf9edfa85c99d55568346a17968e51a02.patch b/06d9b61cf9edfa85c99d55568346a17968e51a02.patch
new file mode 100644
index 0000000..610e40a
--- /dev/null
+++ b/06d9b61cf9edfa85c99d55568346a17968e51a02.patch
@@ -0,0 +1,59 @@
+diff -rupN --no-dereference pyogrio-0.12.1/pyogrio/_compat.py pyogrio-0.12.1-new/pyogrio/_compat.py
+--- pyogrio-0.12.1/pyogrio/_compat.py	2025-11-28 19:23:16.000000000 +0100
++++ pyogrio-0.12.1-new/pyogrio/_compat.py	2026-06-19 16:03:08.195304116 +0200
+@@ -47,6 +47,7 @@ PANDAS_GE_30 = pandas is not None and Ve
+ GDAL_GE_37 = __gdal_version__ >= (3, 7, 0)
+ GDAL_GE_38 = __gdal_version__ >= (3, 8, 0)
+ GDAL_GE_311 = __gdal_version__ >= (3, 11, 0)
++GDAL_GE_313 = __gdal_version__ >= (3, 13, 0)
+ 
+ HAS_GDAL_GEOS = __gdal_geos_version__ is not None
+ 
+diff -rupN --no-dereference pyogrio-0.12.1/pyogrio/tests/test_raw_io.py pyogrio-0.12.1-new/pyogrio/tests/test_raw_io.py
+--- pyogrio-0.12.1/pyogrio/tests/test_raw_io.py	2025-11-28 19:23:16.000000000 +0100
++++ pyogrio-0.12.1-new/pyogrio/tests/test_raw_io.py	2026-06-19 16:03:08.196215490 +0200
+@@ -17,7 +17,7 @@ from pyogrio import (
+     read_info,
+     set_gdal_config_options,
+ )
+-from pyogrio._compat import GDAL_GE_37, HAS_PYARROW, HAS_SHAPELY
++from pyogrio._compat import GDAL_GE_37, GDAL_GE_313, HAS_PYARROW, HAS_SHAPELY
+ from pyogrio.errors import DataLayerError, DataSourceError, FeatureError
+ from pyogrio.raw import open_arrow, read, write
+ from pyogrio.tests.conftest import (
+@@ -1054,7 +1054,10 @@ def test_write_float_nan_null(tmp_path,
+     write(filename, geometry, field_data, fields, **meta)
+     with open(filename) as f:
+         content = f.read()
+-    assert '{ "col": null }' in content
++    if GDAL_GE_313:
++        assert '{"col":null}' in content
++    else:
++        assert '{ "col": null }' in content
+ 
+     # set to False
+     # by default, GDAL will skip the property for GeoJSON if the value is NaN
+@@ -1066,7 +1069,10 @@ def test_write_float_nan_null(tmp_path,
+         write(filename, geometry, field_data, fields, **meta, nan_as_null=False)
+     with open(filename) as f:
+         content = f.read()
+-    assert '"properties": { }' in content
++    if GDAL_GE_313:
++        assert '"properties":{}' in content
++    else:
++        assert '"properties": { }' in content
+ 
+     # but can instruct GDAL to write NaN to json
+     write(
+@@ -1080,7 +1086,10 @@ def test_write_float_nan_null(tmp_path,
+     )
+     with open(filename) as f:
+         content = f.read()
+-    assert '{ "col": NaN }' in content
++    if GDAL_GE_313:
++        assert '{"col":NaN}' in content
++    else:
++        assert '{ "col": NaN }' in content
+ 
+ 
+ @requires_pyarrow_api

diff --git a/python-pyogrio.spec b/python-pyogrio.spec
index 70c3546..ea2a066 100644
--- a/python-pyogrio.spec
+++ b/python-pyogrio.spec
@@ -17,6 +17,8 @@ URL:            https://github.com/geopandas/pyogrio
 Source:         %pypi_source %{srcname}
 # Some Fedora-specific things
 Patch:          0001-Drop-extra-dependencies.patch
+# Backport fix for test failure with gdal-3.14+
+Patch:          https://github.com/geopandas/pyogrio/commit/06d9b61cf9edfa85c99d55568346a17968e51a02.patch
 
 # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch:    %{ix86}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-19 14:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-19 14:10 [rpms/python-pyogrio] rawhide: Backport fix for test failure with gdal-3.14+ Sandro Mani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox