diff --git a/django/contrib/gis/geos/point.py b/django/contrib/gis/geos/point.py index de21e01644..ec95cf1f63 100644 --- a/django/contrib/gis/geos/point.py +++ b/django/contrib/gis/geos/point.py @@ -1,4 +1,3 @@ -import warnings from ctypes import c_uint from django.contrib.gis import gdal @@ -6,7 +5,6 @@ from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.utils import six -from django.utils.deprecation import RemovedInDjango20Warning from django.utils.six.moves import range @@ -151,19 +149,5 @@ class Point(GEOSGeometry): "Sets the coordinates of the point with the given tuple." self._cs[0] = tup - def get_coords(self): - warnings.warn( - "`get_coords()` is deprecated, use the `tuple` property instead.", - RemovedInDjango20Warning, 2 - ) - return self.tuple - - def set_coords(self, tup): - warnings.warn( - "`set_coords()` is deprecated, use the `tuple` property instead.", - RemovedInDjango20Warning, 2 - ) - self.tuple = tup - # The tuple and coords properties coords = tuple diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index 59a6e1f805..6025e7de88 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -330,3 +330,6 @@ these features. * The ``get_x()``, ``set_x()``, ``get_y()``, ``set_y()``, ``get_z()``, and ``set_z()`` methods of ``django.contrib.gis.geos.Point`` are removed. + +* The ``get_coords()`` and ``set_coords()`` methods of + ``django.contrib.gis.geos.Point`` are removed. diff --git a/tests/gis_tests/geos_tests/test_geos.py b/tests/gis_tests/geos_tests/test_geos.py index 6a689188d2..4ee3c7309a 100644 --- a/tests/gis_tests/geos_tests/test_geos.py +++ b/tests/gis_tests/geos_tests/test_geos.py @@ -1316,14 +1316,6 @@ class GEOSTest(SimpleTestCase, TestDataMixin): p.transform(2774) self.assertEqual(p, Point(srid=2774)) - @ignore_warnings(category=RemovedInDjango20Warning) - def test_deprecated_point_tuple_getters_setters(self): - p = Point(1, 2, 3) - self.assertEqual(p.get_coords(), (p.x, p.y, p.z)) - - p.set_coords((3, 2, 1)) - self.assertEqual(p.get_coords(), (3, 2, 1)) - @ignore_warnings(category=RemovedInDjango20Warning) def test_deprecated_cascaded_union(self): for geom in self.geometries.multipolygons: