From 789b07544798a9c83d0b74dce7c33fcd8d929a7d Mon Sep 17 00:00:00 2001 From: David Smith Date: Thu, 19 Sep 2024 17:15:22 +0100 Subject: [PATCH] Fixed #35774 -- Dropped support for GEOS 3.8. GEOS 3.8 (released Oct-2019) will be more than 5 years old when Django 6.1 is released (Aug-2026). --- docs/ref/contrib/gis/geos.txt | 2 +- docs/ref/contrib/gis/install/geolibs.txt | 3 +-- docs/releases/6.1.txt | 2 ++ tests/gis_tests/geos_tests/test_geos.py | 8 +++----- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt index 85601a8685..c107e68262 100644 --- a/docs/ref/contrib/gis/geos.txt +++ b/docs/ref/contrib/gis/geos.txt @@ -712,7 +712,7 @@ Other Properties & Methods the input vertices. If the geometry is already valid, it is returned untouched. This is similar to the :class:`~django.contrib.gis.db.models.functions.MakeValid` database - function. Requires GEOS 3.8. + function. .. method:: GEOSGeometry.normalize(clone=False) diff --git a/docs/ref/contrib/gis/install/geolibs.txt b/docs/ref/contrib/gis/install/geolibs.txt index 37b4a942f8..6619bdcc97 100644 --- a/docs/ref/contrib/gis/install/geolibs.txt +++ b/docs/ref/contrib/gis/install/geolibs.txt @@ -13,7 +13,7 @@ geospatial libraries: ============================== ==================================== ================================ ======================================================= Program Description Required Supported Versions ============================== ==================================== ================================ ======================================================= -:ref:`GEOS ` Geometry Engine Open Source Yes 3.14, 3.13, 3.12, 3.11, 3.10, 3.9, 3.8 +:ref:`GEOS ` Geometry Engine Open Source Yes 3.14, 3.13, 3.12, 3.11, 3.10, 3.9 `PROJ`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 9.x, 8.x, 7.x, 6.x :ref:`GDAL ` Geospatial Data Abstraction Library Yes 3.11, 3.10, 3.9, 3.8, 3.7, 3.6, 3.5, 3.4, 3.3, 3.2, 3.1 :ref:`GeoIP ` IP-based geolocation library No 2 @@ -26,7 +26,6 @@ totally fine with GeoDjango. Your mileage may vary. .. Libs release dates: - GEOS 3.8.0 2019-10-10 GEOS 3.9.0 2020-12-14 GEOS 3.10.0 2021-10-20 GEOS 3.11.0 2022-07-01 diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt index ed1855cac9..ae588a3fdb 100644 --- a/docs/releases/6.1.txt +++ b/docs/releases/6.1.txt @@ -338,6 +338,8 @@ backends. * Support for PostGIS 3.1 is removed. +* Support for GEOS 3.8 is removed. + :mod:`django.contrib.postgres` ------------------------------ diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py index 5ec997556b..025e4fb4f3 100644 --- a/tests/gis_tests/geos_tests/test_geos.py +++ b/tests/gis_tests/geos_tests/test_geos.py @@ -1295,11 +1295,9 @@ class GEOSTest(SimpleTestCase, TestDataMixin): # Testing __getitem__ (doesn't work on Point or Polygon) if isinstance(g, Point): - # IndexError is not raised in GEOS 3.8.0. - if geos_version_tuple() != (3, 8, 0): - msg = "Invalid GEOS Geometry index:" - with self.assertRaisesMessage(IndexError, msg): - g.x + msg = "Invalid GEOS Geometry index:" + with self.assertRaisesMessage(IndexError, msg): + g.x elif isinstance(g, Polygon): lr = g.shell self.assertEqual("LINEARRING EMPTY", lr.wkt)