summaryrefslogtreecommitdiff
path: root/tests/queryset_pickle
Commit message (Collapse)AuthorAgeFilesLines
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-072-69/+87
|
* Refs #33333 -- Fixed ↵Mariusz Felisiak2021-12-042-3/+8
| | | | | | 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.
* Fixed #33333 -- Fixed setUpTestData() crash with models.BinaryField on ↵Mariusz Felisiak2021-12-032-0/+5
| | | | | | | | | PostgreSQL. This makes models.BinaryField pickleable on PostgreSQL. Regression in 3cf80d3fcf7446afdde16a2be515c423f720e54d. Thanks Adam Zimmerman for the report.
* Refs #32548 -- Added tests for passing conditional expressions to Q().Mariusz Felisiak2021-03-171-0/+11
|
* Refs #31926 -- Made test_pickle_filteredrelation_m2m do not depend on auto-PK.Mariusz Felisiak2020-10-152-2/+3
| | | | This caused failures on CockroachDB that use random rather than serial pk values.
* Refs #31926 -- Fixed reverse related identity crash on Q() limit_choices_to.Simon Charette2020-10-051-1/+1
|
* Fixed #31926 -- Fixed recreating queryset with FilteredRelation when using a ↵David-Wobrock2020-10-051-0/+34
| | | | | | | 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).
* Fixed #31943 -- Fixed recreating QuerySet.values()/values_list() when using ↵Hasan Ramezani2020-09-111-1/+23
| | | | a pickled Query.
* Refs #30727 -- Added tests for Subquery with queryset in kwargs pickle ↵Mariusz Felisiak2020-05-191-0/+12
| | | | without evaluating it.
* Optimized Model and QuerySet pickling version comparison.Adam Johnson2020-05-111-2/+5
|
* Refs #25361 -- Added test for pickling queryset of abstract-inherited models ↵Baptiste Mispelon2019-12-122-1/+21
| | | | | | with Meta.ordering. Fixed in 67cf5efa31acb2916034afb15610b700695dfcb0.
* Fixed #20577 -- Deferred filtering of prefetched related querysets.Alex Aktsipetrov2019-10-211-0/+6
| | | | | | | 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.
* Fixed #30727 -- Made Subquery pickle without evaluating their QuerySet.Andrew Brown2019-08-271-0/+35
| | | | | Subquery expression objects, when pickled, were evaluating the QuerySet objects saved in its _constructor_args attribute.
* Switched setUp() to setUpTestData() where possible in Django's tests.Simon Charette2018-11-271-1/+2
|
* Removed unnecessary trailing commas and spaces in various code.Mariusz Felisiak2017-12-281-1/+1
|
* Refs #28575 -- Made RelatedObjectDoesNotExist classes pickable.Simon Charette2017-10-182-0/+13
| | | Thanks to Rachel Tobin for the initial __qualname__ work and tests.
* Refs #28575 -- Allowed pickling Model.DoesNotExist and ↵Rachel Tobin2017-10-131-0/+8
| | | | MultipleObjectsReturned classes.
* Converted usage of ugettext* functions to their gettext* aliasesClaude Paroz2017-02-071-1/+1
| | | | Thanks Tim Graham for the review.
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-2/+2
|
* Refs #23919 -- Removed str() conversion of type and method __name__.Simon Charette2017-01-191-2/+1
|
* Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette2017-01-191-2/+2
|
* Refs #23919 -- Removed six.PY2/PY3 usageClaude Paroz2017-01-182-7/+1
| | | | Thanks Tim Graham for the review.
* Refs #23919 -- Removed encoding preambles and future importsClaude Paroz2017-01-181-2/+0
|
* Fixed #27499 -- Made Prefetches pickle without evaluating their QuerySet.Adam Chainz2016-11-231-0/+9
|
* Added more tests for pickling Prefetches with QuerySets.Adam Chainz2016-11-231-0/+19
|
* Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za2016-11-101-1/+1
|
* Fixed #27159 -- Prevented pickling a query with an __in=inner_qs lookup from ↵Jani Tiainen2016-09-221-0/+39
| | | | evaluating inner_qs.
* Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen2016-09-131-3/+3
| | | | assertSequenceEqual().
* Fixed many spelling mistakes in code, comments, and docs.Josh Soref2015-12-031-1/+1
|
* Fixed #25745 -- Promoted RuntimeWarnings to errors in the test suite.Simon Charette2015-11-141-13/+4
|
* Refs #17917 -- Added a test for pickling annotations on fields with callable ↵Tim Graham2015-10-071-0/+6
| | | | | | defaults. Fixed in f403653cf146384946e5c879ad2a351768ebc226.
* Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella2015-07-271-1/+1
| | | | ForeignKey/OneToOneField
* Refs #24919 -- Made test models serializable for migrations.Tim Graham2015-07-212-20/+9
|
* Fixed #24831 -- Fixed pickling queryset with prefetch_related() after ↵Andriy Sokolovskiy2015-06-021-0/+14
| | | | deleting objects.
* Fixed mistakes in tests unveiled by version bump to 1.8.1.Tim Graham2015-04-022-7/+7
| | | | Forwardport of e7366ab1f908b8cbf8d7e83037b5f17d101b5ade from stable/1.8.x
* Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen2015-03-251-1/+1
| | | | | | | | 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.
* Fixed #24381 -- removed ForeignObjectRel opts and to_optsAnssi Kääriäinen2015-02-231-0/+3
| | | | | | | | | 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.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-062-3/+3
|
* Fixed #24211 -- Removed ValuesQuerySet() and ValuesListQuerySet().Loic Bistuer2015-01-301-2/+1
| | | | Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
* Fixed #12663 -- Formalized the Model._meta API for retrieving fields.Daniel Pyrathon2015-01-061-1/+1
| | | | | Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
* Complemented pickle test for ValuesQuerySet with related fieldClaude Paroz2014-12-242-0/+6
| | | | Refs #14515.
* Fixed #21430 -- Added a RuntimeWarning when unpickling Models and QuerySets ↵Anubhav Joshi2014-06-112-1/+48
| | | | | | | 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.
* Fixed #21853 -- Fixed Manager.__module__ to properly return ↵Loic Bistuer2014-01-281-0/+3
| | | | | | | | '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.
* Fixed all E261 warningscoagulant2013-11-021-1/+1
|
* Fixing E302 ErrorsJason Myers2013-11-021-0/+6
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Fixed #21302 -- Fixed unused imports and import *.Tim Graham2013-11-021-1/+0
|
* Fix all violators of E231Alex Gaynor2013-10-261-1/+1
|
* Added tests for double-pickling a QuerySetAnssi Kääriäinen2013-09-141-0/+12
| | | | Refs #21102.
* Removed most of absolute_import importsClaude Paroz2013-07-292-4/+2
| | | | | Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
* Fixed #20625 -- Chainable Manager/QuerySet methods.Loic Bistuer2013-07-261-0/+4
| | | | | | | | | | | Additionally this patch solves the orthogonal problem that specialized `QuerySet` like `ValuesQuerySet` didn't inherit from the current `QuerySet` type. This wasn't an issue until now because we didn't officially support custom `QuerySet` but it became necessary with the introduction of this new feature. Thanks aaugustin, akaariai, carljm, charettes, mjtamlyn, shaib and timgraham for the reviews.