Skip to content

Commit

Permalink
Fixed #17427 -- Removed dubious definition of connections equality.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaugustin committed Jun 7, 2014
1 parent d98cc41 commit 58de495
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 47 deletions.
11 changes: 0 additions & 11 deletions django/db/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,6 @@ def __init__(self, settings_dict, alias=DEFAULT_DB_ALIAS,
self.allow_thread_sharing = allow_thread_sharing
self._thread_ident = thread.get_ident()

def __eq__(self, other):
if isinstance(other, BaseDatabaseWrapper):
return self.alias == other.alias
return NotImplemented

def __ne__(self, other):
return not self == other

def __hash__(self):
return hash(self.alias)

@property
def queries(self):
if len(self.queries_log) == self.queries_log.maxlen:
Expand Down
3 changes: 3 additions & 0 deletions docs/releases/1.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ Miscellaneous

* ``connections.queries`` is now a read-only attribute.

* Database connections are considered equal only if they're the same object.
They aren't hashable any more.

* ``URLField.to_python`` no longer adds a trailing slash to pathless URLs.

* ``django.contrib.gis`` dropped support for GEOS 3.1 and GDAL 1.6.
Expand Down
Empty file removed tests/db_backends/__init__.py
Empty file.
36 changes: 0 additions & 36 deletions tests/db_backends/tests.py

This file was deleted.

0 comments on commit 58de495

Please sign in to comment.