Fix storing copies of serialized objects in WebAPIResource.
Review Request #7082 — Created March 18, 2015 and submitted — Latest diff uploaded
WebAPIResource stores a copy of the generated serialized object for later use. This is because the caller may modify the contents, breaking what's later returned. We were using deepcopy() for this task, but that behaved very badly with Django models. We now have our own more light-weight function for safely cloning the data we care about from a serialized object. Fewer things need to be copied, and we know we're only duplicating what's needed.
Review Board and Djblets unit tests pass.
I didn't hit the breakage with Power Pack that I was previously hitting.