Fixed #26675 -- Dropped support for PostgreSQL 9.2/PostGIS 2.0.

This commit is contained in:
Tim Graham 2016-05-28 20:11:42 -04:00
parent d02e33141d
commit bc84278615
6 changed files with 13 additions and 15 deletions

View File

@ -220,7 +220,7 @@ class PostGISOperations(BaseSpatialOperations, DatabaseOperations):
raise ImproperlyConfigured(
'Cannot determine PostGIS version for database "%s" '
'using command "SELECT postgis_lib_version()". '
'GeoDjango requires at least PostGIS version 2.0. '
'GeoDjango requires at least PostGIS version 2.1. '
'Was the database created from a spatial database '
'template?' % self.connection.settings_dict['NAME']
)

View File

@ -12,7 +12,7 @@ Program Description Required
`PROJ.4`_ Cartographic Projections library Yes (PostgreSQL and SQLite only) 4.9, 4.8, 4.7, 4.6, 4.5, 4.4
:doc:`GDAL <../gdal>` Geospatial Data Abstraction Library Yes (SQLite only) 2.1, 2.0, 1.11, 1.10, 1.9, 1.8, 1.7
:doc:`GeoIP <../geoip>` IP-based geolocation library No 1.4
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.2, 2.1, 2.0
`PostGIS`__ Spatial extensions for PostgreSQL Yes (PostgreSQL only) 2.2, 2.1
`SpatiaLite`__ Spatial extensions for SQLite Yes (SQLite only) 4.3, 4.2, 4.1, 4.0
======================== ==================================== ================================ ===================================
@ -30,7 +30,6 @@ totally fine with GeoDjango. Your mileage may vary.
GDAL 1.11.0 2014-04-25
GDAL 2.0.0 2015-06
GDAL 2.1.0 2016-04
PostGIS 2.0.0 2012-04-03
PostGIS 2.1.0 2013-08-17
PostGIS 2.2.0 2015-10-17
Spatialite 4.0.0 2012-11-25

View File

@ -58,7 +58,7 @@ supported versions, and any notes for each of the supported database backends:
================== ============================== ================== =========================================
Database Library Requirements Supported Versions Notes
================== ============================== ================== =========================================
PostgreSQL GEOS, PROJ.4, PostGIS 9.2+ Requires PostGIS.
PostgreSQL GEOS, PROJ.4, PostGIS 9.3+ Requires PostGIS.
MySQL GEOS 5.5+ Not OGC-compliant; :ref:`limited functionality <mysql-spatial-limitations>`.
Oracle GEOS 11.2+ XE not supported.
SQLite GEOS, GDAL, PROJ.4, SpatiaLite 3.6.+ Requires SpatiaLite 4.0+, pysqlite2 2.5+

View File

@ -92,7 +92,7 @@ below for information on how to set up your database correctly.
PostgreSQL notes
================
Django supports PostgreSQL 9.2 and higher. It requires the use of `psycopg2`_
Django supports PostgreSQL 9.3 and higher. It requires the use of `psycopg2`_
2.4.5 or higher (or 2.5+ if you want to use :mod:`django.contrib.postgres`).
.. _psycopg2: http://initd.org/psycopg/

View File

@ -204,6 +204,15 @@ Database backend API
* ...
Dropped support for PostgreSQL 9.2 and PostGIS 2.0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Upstream support for PostgreSQL 9.2 ends in September 2017. As a consequence,
Django 1.11 sets PostgreSQL 9.3 as the minimum version it officially supports.
Support for PostGIS 2.0 is also removed as PostgreSQL 9.2 is the last version
to support it.
Miscellaneous
-------------

View File

@ -22,11 +22,6 @@ from .models import (
)
def postgis_bug_version():
spatial_version = getattr(connection.ops, "spatial_version", (0, 0, 0))
return spatial_version and (2, 0, 0) <= spatial_version <= (2, 0, 1)
@skipUnlessDBFeature("gis_enabled")
class GeoModelTest(TestCase):
fixtures = ['initial']
@ -314,11 +309,6 @@ class GeoLookupTest(TestCase):
# Right: A >> B => true if xmin(A) > xmax(B)
# See: BOX2D_left() and BOX2D_right() in lwgeom_box2dfloat4.c in PostGIS source.
# The left/right lookup tests are known failures on PostGIS 2.0/2.0.1
# http://trac.osgeo.org/postgis/ticket/2035
if postgis_bug_version():
self.skipTest("PostGIS 2.0/2.0.1 left and right lookups are known to be buggy.")
# Getting the borders for Colorado & Kansas
co_border = State.objects.get(name='Colorado').poly
ks_border = State.objects.get(name='Kansas').poly