summaryrefslogtreecommitdiff
path: root/tests/queryset_pickle
AgeCommit message (Collapse)Author
2026-02-05Refs #33579 -- Added extra tests for NotUpdated exception.Nick Pope
When `NotUpdated` was added in ab148c02cedbac492f29930dcd5346e1af052635, these additional tests that have equivalents for the `DoesNotExist` and `MultipleObjectsReturned` exceptions were missed.
2025-10-16Refs #28586 -- Made fetch modes pickle as singletons.Adam Johnson
This change ensures that we don’t create new instances of fetch modes when pickling and unpickling, saving memory and preserving their singleton nature.
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-12-04Refs #33333 -- Fixed ↵Mariusz Felisiak
PickleabilityTestCase.test_annotation_with_callable_default() crash on Oracle. Grouping by LOBs is not allowed on Oracle. This moves a binary field to a separate model.
2021-12-03Fixed #33333 -- Fixed setUpTestData() crash with models.BinaryField on ↵Mariusz Felisiak
PostgreSQL. This makes models.BinaryField pickleable on PostgreSQL. Regression in 3cf80d3fcf7446afdde16a2be515c423f720e54d. Thanks Adam Zimmerman for the report.
2021-03-17Refs #32548 -- Added tests for passing conditional expressions to Q().Mariusz Felisiak
2020-10-15Refs #31926 -- Made test_pickle_filteredrelation_m2m do not depend on auto-PK.Mariusz Felisiak
This caused failures on CockroachDB that use random rather than serial pk values.
2020-10-05Refs #31926 -- Fixed reverse related identity crash on Q() limit_choices_to.Simon Charette
2020-10-05Fixed #31926 -- Fixed recreating queryset with FilteredRelation when using a ↵David-Wobrock
pickled Query. In a pickled join, the join_fields had the same values, but weren't the same object (contrary to when not pickling the QuerySet).
2020-09-11Fixed #31943 -- Fixed recreating QuerySet.values()/values_list() when using ↵Hasan Ramezani
a pickled Query.
2020-05-19Refs #30727 -- Added tests for Subquery with queryset in kwargs pickle ↵Mariusz Felisiak
without evaluating it.
2020-05-11Optimized Model and QuerySet pickling version comparison.Adam Johnson
2019-12-12Refs #25361 -- Added test for pickling queryset of abstract-inherited models ↵Baptiste Mispelon
with Meta.ordering. Fixed in 67cf5efa31acb2916034afb15610b700695dfcb0.
2019-10-21Fixed #20577 -- Deferred filtering of prefetched related querysets.Alex Aktsipetrov
Added internal interface to QuerySet that allows to defer next filter call till .query is accessed. Used it to optimize prefetch_related(). Thanks Simon Charette for the review.
2019-08-27Fixed #30727 -- Made Subquery pickle without evaluating their QuerySet.Andrew Brown
Subquery expression objects, when pickled, were evaluating the QuerySet objects saved in its _constructor_args attribute.
2018-11-27Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette
2017-12-28Removed unnecessary trailing commas and spaces in various code.Mariusz Felisiak
2017-10-18Refs #28575 -- Made RelatedObjectDoesNotExist classes pickable.Simon Charette
Thanks to Rachel Tobin for the initial __qualname__ work and tests.
2017-10-13Refs #28575 -- Allowed pickling Model.DoesNotExist and ↵Rachel Tobin
MultipleObjectsReturned classes.
2017-02-07Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz
Thanks Tim Graham for the review.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Removed str() conversion of type and method __name__.Simon Charette
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-11-23Fixed #27499 -- Made Prefetches pickle without evaluating their QuerySet.Adam Chainz
2016-11-23Added more tests for pickling Prefetches with QuerySets.Adam Chainz
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-09-22Fixed #27159 -- Prevented pickling a query with an __in=inner_qs lookup from ↵Jani Tiainen
evaluating inner_qs.
2016-09-13Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen
assertSequenceEqual().
2015-12-03Fixed many spelling mistakes in code, comments, and docs.Josh Soref
2015-11-14Fixed #25745 -- Promoted RuntimeWarnings to errors in the test suite.Simon Charette
2015-10-07Refs #17917 -- Added a test for pickling annotations on fields with callable ↵Tim Graham
defaults. Fixed in f403653cf146384946e5c879ad2a351768ebc226.
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-07-21Refs #24919 -- Made test models serializable for migrations.Tim Graham
2015-06-02Fixed #24831 -- Fixed pickling queryset with prefetch_related() after ↵Andriy Sokolovskiy
deleting objects.
2015-04-02Fixed mistakes in tests unveiled by version bump to 1.8.1.Tim Graham
Forwardport of e7366ab1f908b8cbf8d7e83037b5f17d101b5ade from stable/1.8.x
2015-03-25Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen
Field.rel is now deprecated. Rel objects have now also remote_field attribute. This means that self == self.remote_field.remote_field. In addition, made the Rel objects a bit more like Field objects. Still, marked ManyToManyFields as null=True.
2015-02-23Fixed #24381 -- removed ForeignObjectRel opts and to_optsAnssi Kääriäinen
These cached properies were causing problems with pickling, and in addition they were confusingly defined: field.rel.model._meta was not the same as field.rel.opts. Instead users should use field.rel.related_model._meta inplace of field.rel.opts, and field.rel.to._meta in place of field.rel.to_opts.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-30Fixed #24211 -- Removed ValuesQuerySet() and ValuesListQuerySet().Loic Bistuer
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
2015-01-06Fixed #12663 -- Formalized the Model._meta API for retrieving fields.Daniel Pyrathon
Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
2014-12-24Complemented pickle test for ValuesQuerySet with related fieldClaude Paroz
Refs #14515.
2014-06-11Fixed #21430 -- Added a RuntimeWarning when unpickling Models and QuerySets ↵Anubhav Joshi
from a different Django version. Thanks FunkyBob for the suggestion, prasoon2211 for the initial patch, and akaariai, loic, and charettes for helping in shaping the patch.
2014-01-28Fixed #21853 -- Fixed Manager.__module__ to properly return ↵Loic Bistuer
'django.db.models.manager'. The combination of BaseManager.from_queryset() and RenameMethodsBase results in Manager.__module__ having the wrong value. This can be an issue when trying to pickle the Manager class.
2013-11-02Fixed all E261 warningscoagulant
2013-11-02Fixing E302 ErrorsJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02Fixed #21302 -- Fixed unused imports and import *.Tim Graham
2013-10-26Fix all violators of E231Alex Gaynor