Add ETag data generation to the avatar service API

Review Request #8566 — Created Dec. 12, 2016 and submitted

Information

Djblets
release-0.10.x
65586a2...

Reviewers

Avatar services can now generate ETag (Entity Tag) data to be used in
generating caching information for the avatars. This will allow pages
that use the avatar to be cached and only retrieved if the avatar
changes.

Tested this with Review Board in /r/8567. Saw that it worked correctly.

Description From Last Updated

It also doesn't need to be in any particular order, it just needs to be a stable sort.

daviddavid

This could be very slightly improved: for key, value in sorted(urls): data.append(key) data.append(value)

daviddavid
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/avatars/services/url.py
        djblets/avatars/services/file_upload.py
        djblets/avatars/services/gravatar.py
        djblets/avatars/services/base.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/avatars/services/url.py
        djblets/avatars/services/file_upload.py
        djblets/avatars/services/gravatar.py
        djblets/avatars/services/base.py
    
    
  2. 
      
david
  1. 
      
  2. djblets/avatars/services/url.py (Diff revision 1)
     
     
     
    Show all issues

    It also doesn't need to be in any particular order, it just needs to be a stable sort.

  3. 
      
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/avatars/services/url.py
        djblets/avatars/services/file_upload.py
        djblets/avatars/services/gravatar.py
        djblets/avatars/services/base.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/avatars/services/url.py
        djblets/avatars/services/file_upload.py
        djblets/avatars/services/gravatar.py
        djblets/avatars/services/base.py
    
    
  2. 
      
david
  1. 
      
  2. djblets/avatars/services/url.py (Diff revision 2)
     
     
     
     
    Show all issues

    This could be very slightly improved:

    for key, value in sorted(urls):
        data.append(key)
        data.append(value)
    
  3. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.10.x (93e4325)