Opened 15 years ago

Closed 14 years ago

#11943 closed (invalid)

changeset 10544 breaks field emulation compatibility

Reported by: termie Owned by: nobody
Component: Core (Serialization) Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

this refers to changes to the handle_field call in

http://code.djangoproject.com/changeset/10554/django/trunk/django/core/serializers/python.py

previous versions of this call had a fairly open interpretation of what it takes to be a field, you needed only have a name and be accessible on the object via that name.

The goal of the change is to allow fields to have some say over the result of that in terms of how it is turned into a string, however it radically increases the interface a field must implement and additionally expects to access a protected method on that field.

Attached patch maintains existing behavior while falling back to old broader behavior when the new interface has not been implemented.

Attachments (1)

serializer.diff (1.4 KB ) - added by termie 15 years ago.

Download all attachments as: .zip

Change History (2)

by termie, 15 years ago

Attachment: serializer.diff added

comment:1 by Russell Keith-Magee, 14 years ago

Resolution: invalid
Status: newclosed

Ok - this is the sort of situation where a test case is absolutely *essential*. From your description, it sounds like to me like [10544] cleaned up a previously existing bug.

Closing invalid because the ticket doesn't provide enough detail to reproduce the problem. If you can provide a specific test case - preferably integrated into the test suite as part of the patch - please reopen.

Note: See TracTickets for help on using tickets.
Back to Top