diff options
| author | Tim Graham <timograham@gmail.com> | 2016-12-31 09:33:40 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-01-17 20:52:01 -0500 |
| commit | a0149848f7c068bc8507d3ec6f93cd2b7256098a (patch) | |
| tree | 6af60be50c11400b9bc7d65382dca0de1a53625d | |
| parent | ed251246cc6a22561217f38f7cf96598b22ff0fe (diff) | |
Refs #25665 -- Removed GEOSGeometry.get/set_srid() per deprecation timeline.
| -rw-r--r-- | django/contrib/gis/geos/geometry.py | 16 | ||||
| -rw-r--r-- | docs/releases/2.0.txt | 3 | ||||
| -rw-r--r-- | tests/gis_tests/geos_tests/test_geos.py | 8 |
3 files changed, 3 insertions, 24 deletions
diff --git a/django/contrib/gis/geos/geometry.py b/django/contrib/gis/geos/geometry.py index ffbbc0c859..cf5886dc07 100644 --- a/django/contrib/gis/geos/geometry.py +++ b/django/contrib/gis/geos/geometry.py @@ -5,7 +5,6 @@ from __future__ import unicode_literals import json -import warnings from ctypes import addressof, byref, c_double from django.contrib.gis import gdal @@ -22,7 +21,6 @@ from django.contrib.gis.geos.prototypes.io import ( ) from django.utils import six from django.utils.deconstruct import deconstructible -from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import force_bytes, force_text @@ -385,20 +383,6 @@ class GEOSGeometry(GEOSBase, ListMixin): "Sets the SRID for the geometry." capi.geos_set_srid(self.ptr, 0 if srid is None else srid) - def get_srid(self): - warnings.warn( - "`get_srid()` is deprecated, use the `srid` property instead.", - RemovedInDjango20Warning, 2 - ) - return self.srid - - def set_srid(self, srid): - warnings.warn( - "`set_srid()` is deprecated, use the `srid` property instead.", - RemovedInDjango20Warning, 2 - ) - self.srid = srid - # #### Output Routines #### @property def ewkt(self): diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index 1d46067405..c4e3a90d84 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -324,3 +324,6 @@ these features. * Support for direct assignment to a reverse foreign key or many-to-many relation is removed. + +* The ``get_srid()`` and ``set_srid()`` methods of + ``django.contrib.gis.geos.GEOSGeometry`` are removed. diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py index 2aee39072d..92f89ce88f 100644 --- a/tests/gis_tests/geos_tests/test_geos.py +++ b/tests/gis_tests/geos_tests/test_geos.py @@ -1317,14 +1317,6 @@ class GEOSTest(SimpleTestCase, TestDataMixin): self.assertEqual(p, Point(srid=2774)) @ignore_warnings(category=RemovedInDjango20Warning) - def test_deprecated_srid_getters_setters(self): - p = Point(1, 2, srid=123) - self.assertEqual(p.get_srid(), p.srid) - - p.set_srid(321) - self.assertEqual(p.srid, 321) - - @ignore_warnings(category=RemovedInDjango20Warning) def test_deprecated_point_coordinate_getters_setters(self): p = Point(1, 2, 3) self.assertEqual((p.get_x(), p.get_y(), p.get_z()), (p.x, p.y, p.z)) |
