summaryrefslogtreecommitdiff
path: root/django/core/serializers
AgeCommit message (Collapse)Author
2023-08-19[4.2.x] Fixed #34779 -- Avoided unnecessary selection of non-nullable m2m ↵Juan Alvarez
fields without natural keys during serialization. By using `select_related(None)` instead of `select_related()`, the unnecessary joins are completely avoided. Note that the current tests already covers the change, when the field is not `null=True`. Regression in f9936deed1ff13b20e18bd9ca2b0750b52706b6c. Backport of 517d3bb4dd17e9c51690c98d747b86a0ed8b2fbf from main
2023-06-04[4.2.x] Fixed #34620 -- Fixed serialization crash on m2m fields without ↵Mariusz Felisiak
natural keys when base querysets use select_related(). Regression in 19e0587ee596debf77540d6a08ccb6507e60b6a7. Thanks Martin Svoboda for the report. Backport of f9936deed1ff13b20e18bd9ca2b0750b52706b6c from main
2023-02-01[4.2.x] Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0 Backport of 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 from main
2022-09-05Fixed #33937 -- Optimized serialization of related m2m fields without ↵Mark Evans
natural keys.
2022-03-18Fixed #33582 -- Fixed deserializing natural keys with foreing key ↵François Granade
dependencies in a multiple database setup.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-01-13Fixed #29708 -- Deprecated PickleSerializer.Adam Johnson
2021-09-02Refs #33012 -- Moved PickleSerializer to django.core.serializers.base and ↵Daniyal Abbasi
added tests.
2021-02-05Fixed #32420 -- Fixed detecting primary key values in deserialization when ↵Mikolaj Rybinski
PK is also a FK.
2020-07-30Bumped minimum isort version to 5.1.0.David Smith
Fixed inner imports per isort 5. isort 5.0.0 to 5.1.0 was unstable.
2020-06-17Fixed #30583 -- Fixed handling JSONFields in XML serializer.Hasan Ramezani
Co-authored-by: Chason Chaffin <chason@gmail.com>
2020-06-17Refs #30190 -- Minor edits to JSONL serializer.Mariusz Felisiak
Follow up to e29637681be07606674cdccb47d1e53acb930f5b.
2020-06-16Fixed #30190 -- Added JSONL serializer.Ali Vakilzade
2020-05-25Fixed #29078 -- Made serializers respect prefetch_related() for m2m fields.Claude Paroz
2020-04-28Fixed #29249 -- Made JSON and YAML serializers use Unicode by default.Hasan Ramezani
2020-04-07Fixed #31051 -- Allowed dumpdata to handle circular references in natural keys.Matthijs Kooijman
Since #26291 forward references in natural keys are properly handled by loaddata, so sorting depenencies in dumpdata doesn't need to break on cycles. This patch allows circular references in natural keys by breaking sort_depenencies() on loops.
2020-01-29Used model's Options.label/label_lower where applicable.Mariusz Felisiak
2019-12-13Fixed #26743 -- Fixed UnboundLocalError crash when deserializing m2m fields ↵Baptiste Mispelon
and value isn't iterable.
2019-06-27Fixed #28725 -- Prevented serializing inherited ManyToManyFields in child model.Nadège Michel
2019-04-18Fixed typos in docs, comments, and exception messages.Ville Skyttä
2019-02-06Fixed #30159 -- Removed unneeded use of OrderedDict.Nick Pope
Dicts preserve order since Python 3.6.
2018-11-27Fixed #28385 -- Fixed deserializing natural keys when primary key has a ↵dmytryi.striletskyi
default value. Co-Authored-By: Hasan Ramezani <hasan.r67@gmail.com>
2018-09-26Refs #29784 -- Switched to https:// links where available.Jon Dufresne
2018-08-01Fixed typos in comments and docs.luz.paz
2018-07-13Fixed #26291 -- Allowed loaddata to handle forward references in natural_key ↵Peter Inglesby
fixtures.
2018-03-20Extracted deserialize fk/m2m functions from Deserializer.Peter Inglesby
In preparation for handling forward references (refs #26291).
2018-02-12Fixed #24607 -- Serialized natural keys in multi-table inheritance models.Denys Duchier
Thanks João Paulo Melo de Sampaio for the test.
2018-01-03Fixed #28982 -- Simplified code with and/or.Дилян Палаузов
2018-01-03Simplified an iterator in core.serializers.sort_dependencies().Sergey Fedoseev
Follow up to acc8dd4142ec81def9a73507120c0262ba6b1264.
2018-01-03Fixed #28984 -- Made assorted code simplifications.Tim Graham
2017-12-07Refs #23919 -- Replaced super() calls for old-style classes.Nick Pope
2017-06-20Fixed #28324 -- Made feedgenerators write feeds with deterministically ↵Georg Sauthoff
ordered attributes.
2017-06-05Replaced Model._get_pk_val() with pk property.Tim Graham
Model.pk was added after _get_pk_val() and many places weren't simplified.
2017-06-05Refs #27795 -- Removed force_text() usage in serialization frameworkClaude Paroz
2017-05-20Refs #16850 -- Removed obsolete simplejson support in JSON serializer.Tim Graham
cpython's json version is 2.0.9 so this line is never used.
2017-04-27Refs #23919 -- Removed force_text() in Python deserializer needed only on ↵Claude Paroz
Python 2
2017-04-27Refs #27795 -- Replaced many force_text() with str()Claude Paroz
Thanks Tim Graham for the review.
2017-02-23Refs #23919 -- Used yield from.Vytis Banaitis
2017-02-21Refs #27656 -- Updated django.core docstring verbs according to PEP 257.Anton Samarchyan
2017-02-11Fixed #27742 -- Reverted "Fixed #24607 -- Serialized natural keys in ↵Tim Graham
multi-table inheritance models." This reverts commit 74a575eb7296fb04e1fc2bd4e3f68dee3c66ee0a as it causes unexpected migrations and doesn't seem to be the best solution.
2017-02-09Refs #23919 -- Removed default 'utf-8' argument for str.encode()/decode().Tim Graham
2017-02-01Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.Vytis Banaitis
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-22Refs #23919 -- Replaced six.reraise by raiseClaude Paroz
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-18Refs #23919 -- Removed six.<various>_types usageClaude Paroz
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-12-01Fixed #27546 -- Removed hardcoded class names in __repr__() methods.Keda87
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami