diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py index 225b4ff20d..fe510ac142 100644 --- a/django/contrib/gis/gdal/libgdal.py +++ b/django/contrib/gis/gdal/libgdal.py @@ -30,8 +30,6 @@ elif os.name == "nt": "gdal301", "gdal300", "gdal204", - "gdal203", - "gdal202", ] elif os.name == "posix": # *NIX library names. @@ -46,8 +44,6 @@ elif os.name == "posix": "gdal3.1.0", "gdal3.0.0", "gdal2.4.0", - "gdal2.3.0", - "gdal2.2.0", ] else: raise ImproperlyConfigured('GDAL is unsupported on OS "%s".' % os.name) diff --git a/docs/ref/contrib/gis/install/geolibs.txt b/docs/ref/contrib/gis/install/geolibs.txt index 059820df8e..7478b1bff1 100644 --- a/docs/ref/contrib/gis/install/geolibs.txt +++ b/docs/ref/contrib/gis/install/geolibs.txt @@ -5,16 +5,16 @@ Installing Geospatial libraries GeoDjango uses and/or provides interfaces for the following open source geospatial libraries: -======================== ==================================== ================================ ================================================ +======================== ==================================== ================================ ====================================== Program Description Required Supported Versions -======================== ==================================== ================================ ================================================ +======================== ==================================== ================================ ====================================== :doc:`GEOS <../geos>` Geometry Engine Open Source Yes 3.11, 3.10, 3.9, 3.8, 3.7, 3.6 `PROJ`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 9.x, 8.x, 7.x, 6.x, 5.x -:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 3.6, 3.5, 3.4, 3.3, 3.2, 3.1, 3.0, 2.4, 2.3, 2.2 +:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes 3.6, 3.5, 3.4, 3.3, 3.2, 3.1, 3.0, 2.4 :doc:`GeoIP <../geoip2>` IP-based geolocation library No 2 `PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 3.3, 3.2, 3.1, 3.0, 2.5 `SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 5.0, 4.3 -======================== ==================================== ================================ ================================================ +======================== ==================================== ================================ ====================================== Note that older or more recent versions of these libraries *may* also work totally fine with GeoDjango. Your mileage may vary. @@ -27,8 +27,6 @@ totally fine with GeoDjango. Your mileage may vary. GEOS 3.9.0 2020-12-14 GEOS 3.10.0 2021-10-20 GEOS 3.11.0 2022-07-01 - GDAL 2.2.0 2017-05 - GDAL 2.3.0 2018-05 GDAL 2.4.0 2018-12 GDAL 3.0.0 2019-05 GDAL 3.1.0 2020-05-07 diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt index a51475f040..1227098459 100644 --- a/docs/releases/5.0.txt +++ b/docs/releases/5.0.txt @@ -417,6 +417,11 @@ backends. ``False`` if the database doesn't support the ``DEFAULT`` keyword in bulk ``INSERT`` queries. +:mod:`django.contrib.gis` +------------------------- + +* Support for GDAL 2.2 and 2.3 is removed. + Using ``create_defaults__exact`` may now be required with ``QuerySet.update_or_create()`` ----------------------------------------------------------------------------------------- diff --git a/tests/gis_tests/inspectapp/tests.py b/tests/gis_tests/inspectapp/tests.py index 0145483f6b..ca5d5214dd 100644 --- a/tests/gis_tests/inspectapp/tests.py +++ b/tests/gis_tests/inspectapp/tests.py @@ -89,8 +89,7 @@ class OGRInspectTest(SimpleTestCase): # Same test with a 25D-type geometry field shp_file = os.path.join(TEST_DATA, "gas_lines", "gas_leitung.shp") model_def = ogrinspect(shp_file, "MyModel", multi_geom=True) - srid = "-1" if GDAL_VERSION < (2, 3) else "31253" - self.assertIn("geom = models.MultiLineStringField(srid=%s)" % srid, model_def) + self.assertIn("geom = models.MultiLineStringField(srid=31253)", model_def) def test_date_field(self): shp_file = os.path.join(TEST_DATA, "cities", "cities.shp")