summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-06-27 03:27:20 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-06-27 03:27:20 +0000
commitade4a1246c5e65ed544a990a720cf1c953ec604b (patch)
treed59615eeffd8a033b7977166e694b998e383995b /tests
parentc237ef625ca97b0e4ccbc08febadf41b7c875645 (diff)
Reorganised the internals of the Where node a bit to fix some copying problems.
We no longer store any reference to Django field instances or models in the Where node. This should improve cloning speed, fix some pickling difficulties, reduce memory usage and remove some infinite loop possibilities in odd cases. Slightly backwards incompatible if you're writing custom filters. See the BackwardsIncompatibleChanges wiki page for details. Fixed #7128, #7204, #7506. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/queries/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py
index c02ad73998..18cea705e5 100644
--- a/tests/regressiontests/queries/models.py
+++ b/tests/regressiontests/queries/models.py
@@ -3,6 +3,7 @@ Various complex queries that have been problematic in the past.
"""
import datetime
+import pickle
from django.db import models
from django.db.models.query import Q
@@ -791,5 +792,9 @@ Empty querysets can be merged with others.
>>> Note.objects.all() & Note.objects.none()
[]
+Bug #7204, #7506 -- make sure querysets with related fields can be pickled. If
+this doesn't crash, it's a Good Thing.
+>>> out = pickle.dumps(Item.objects.all())
+
"""}