Fix storing copies of serialized objects in WebAPIResource.

Review Request #7082 — Created March 18, 2015 and submitted

Information

Djblets
release-0.8.x
0d33101...

Reviewers

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.

Description From Last Updated

'copy' imported but unused

reviewbotreviewbot

'copy' imported but unused

reviewbotreviewbot
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/webapi/resources.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/webapi/resources.py
    
    
  2. djblets/webapi/resources.py (Diff revision 1)
     
     
    Show all issues
     'copy' imported but unused
    
  3. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/webapi/resources.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/webapi/resources.py
    
    
  2. djblets/webapi/resources.py (Diff revision 2)
     
     
    Show all issues
     'copy' imported but unused
    
  3. 
      
brennie
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.8.x (d5eb0f0)
Loading...