Code

Opened 5 years ago

Closed 4 years ago

#11943 closed (invalid)

changeset 10544 breaks field emulation compatibility

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

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 5 years ago.

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by termie

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.