Fix automatic ETag generation for API caching.

Review Request #6979 — Created Feb. 26, 2015 and submitted

Information

Djblets
release-0.8.x
abfc033...

Reviewers

The automatic ETag generation we've had for a long time has been pretty
badly broken, and this became noticeable once we turned on automatic
ETags for all resources in Review Board recently.

Basically, we were computing an ETag from the available field
information on the resource, and not from the values for that particular
object. This meant that if a value changed, the ETag would not.

We now generate it based on the representation of each value in the
computed list.

Unit tests pass.

Tested this manually by fetching a resource, updating a value, and fetching
again.

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/webapi/resources.py
        djblets/webapi/tests.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/webapi/resources.py
        djblets/webapi/tests.py
    
    
  2. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.8.x (89af755)
Loading...