Skip to content

Commit 7bcb9b3

Browse files
COMPAT: avoid using shapely.geos for recent shapely versions (#542)
1 parent 7ada821 commit 7bcb9b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyogrio/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# we try importing shapely, to ensure it is imported (and it can load its
55
# own GEOS copy) before we load GDAL and its linked GEOS
66
import shapely
7-
import shapely.geos # noqa: F401
7+
8+
if shapely.__version__ < "2.0.0":
9+
import shapely.geos
810
except Exception:
911
pass
1012

0 commit comments

Comments
 (0)