summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-12-31 09:42:27 -0500
committerTim Graham <timograham@gmail.com>2017-01-17 20:52:02 -0500
commit997c9f709974ea79d9eb9e83eaf24e7bc0e7f9d4 (patch)
treeef973e5c367bfa4ffff36d4075da9bf67bc5975f
parent19d8e64ac357271e708f6db377975ee85b7e4342 (diff)
Refs #25665 -- Removed deprecated getter/setter of Point.tuple.
-rw-r--r--django/contrib/gis/geos/point.py16
-rw-r--r--docs/releases/2.0.txt3
-rw-r--r--tests/gis_tests/geos_tests/test_geos.py8
3 files changed, 3 insertions, 24 deletions
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
@@ -1317,14 +1317,6 @@ class GEOSTest(SimpleTestCase, TestDataMixin):
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:
mpoly = GEOSGeometry(geom.wkt)