summaryrefslogtreecommitdiff
path: root/django/contrib
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2017-01-18 21:35:59 +0100
committerTim Graham <timograham@gmail.com>2017-01-18 21:44:00 -0500
commiteb422e476f3c0070dbf200bd62d97d12150c6fd9 (patch)
tree5268a6d44f039da8adeaecea0fd605c6653a723d /django/contrib
parent3cc5f01d9bd52930cec3c08d6ec7e19d0c2a6489 (diff)
downloaddjango-eb422e476f3c0070dbf200bd62d97d12150c6fd9.tar.gz
Refs #23919 -- Removed obsolete __ne__() methods.
__ne__() defaults to the opposite of __eq__() on Python 3 when it doesn't return NotImplemented.
Diffstat (limited to 'django/contrib')
-rw-r--r--django/contrib/auth/models.py3
-rw-r--r--django/contrib/gis/gdal/geometries.py4
-rw-r--r--django/contrib/gis/gdal/geomtype.py3
-rw-r--r--django/contrib/gis/geos/geometry.py4
-rw-r--r--django/contrib/postgres/validators.py3
5 files changed, 0 insertions, 17 deletions
diff --git a/django/contrib/auth/models.py b/django/contrib/auth/models.py
index 0fc2ab41da..9eaf7a6e34 100644
--- a/django/contrib/auth/models.py
+++ b/django/contrib/auth/models.py
@@ -391,9 +391,6 @@ class AnonymousUser(object):
def __eq__(self, other):
return isinstance(other, self.__class__)
- def __ne__(self, other):
- return not self.__eq__(other)
-
def __hash__(self):
return 1 # instances always return the same hash value
diff --git a/django/contrib/gis/gdal/geometries.py b/django/contrib/gis/gdal/geometries.py
index 50c1d9ff65..1dd85ac139 100644
--- a/django/contrib/gis/gdal/geometries.py
+++ b/django/contrib/gis/gdal/geometries.py
@@ -179,10 +179,6 @@ class OGRGeometry(GDALBase):
else:
return False
- def __ne__(self, other):
- "Tests for inequality."
- return not (self == other)
-
def __str__(self):
"WKT is used for the string representation."
return self.wkt
diff --git a/django/contrib/gis/gdal/geomtype.py b/django/contrib/gis/gdal/geomtype.py
index 79c3356f5e..37539c8544 100644
--- a/django/contrib/gis/gdal/geomtype.py
+++ b/django/contrib/gis/gdal/geomtype.py
@@ -68,9 +68,6 @@ class OGRGeomType(object):
else:
return False
- def __ne__(self, other):
- return not (self == other)
-
@property
def name(self):
"Returns a short-hand string form of the OGR Geometry type."
diff --git a/django/contrib/gis/geos/geometry.py b/django/contrib/gis/geos/geometry.py
index f49ce2e0de..e015fdc3d5 100644
--- a/django/contrib/gis/geos/geometry.py
+++ b/django/contrib/gis/geos/geometry.py
@@ -177,10 +177,6 @@ class GEOSGeometry(GEOSBase, ListMixin):
else:
return False
- def __ne__(self, other):
- "The not equals operator."
- return not (self == other)
-
# ### Geometry set-like operations ###
# Thanks to Sean Gillies for inspiration:
# http://lists.gispython.org/pipermail/community/2007-July/001034.html
diff --git a/django/contrib/postgres/validators.py b/django/contrib/postgres/validators.py
index 5676da78b0..756ae73440 100644
--- a/django/contrib/postgres/validators.py
+++ b/django/contrib/postgres/validators.py
@@ -66,9 +66,6 @@ class KeysValidator(object):
self.strict == other.strict
)
- def __ne__(self, other):
- return not (self == other)
-
class RangeMaxValueValidator(MaxValueValidator):
def compare(self, a, b):