• 
      

    Fix all known remaining compatibility issues with Django 1.7+.

    Review Request #7423 — Created June 13, 2015 and submitted

    Information

    Djblets
    release-0.9.x
    b468dd4...

    Reviewers

    This updates djblets.cache, djblets.datagrid, and djblets.gravatar to be
    compatible with newer versions of Django. These include pulling in some
    backwards-compatibility functions and updating to use the proper APIs.
    
    In the case of datagrids, the profile-related code has finally been
    removed. I've changed the logic to no longer assume the existence of
    User.get_profile(), and instead to allow subclasses to override a
    function that returns some object (a profile model, or something else)
    for use in data storage.

    All unit tests pass on Django 1.6 and 1.8.

    Description From Last Updated

    'gravatar' imported but unused

    reviewbotreviewbot

    Col: 1 E302 expected 2 blank lines, found 0

    reviewbotreviewbot

    undefined name 'InvalidCacheBackendError'

    reviewbotreviewbot

    undefined name 'InvalidCacheBackendError'

    reviewbotreviewbot

    undefined name 'parse_qsl'

    reviewbotreviewbot

    Col: 42 E226 missing whitespace around arithmetic operator

    reviewbotreviewbot

    This will now fail if profile is None.

    daviddavid

    This docstring isn't in the right format.

    daviddavid

    Single quotes.

    daviddavid

    Single quotes.

    daviddavid

    from __future__ import unicode_literals

    brenniebrennie

    Can you expand this to say where it comes from? Also this should probably include django's LICENSE.

    daviddavid

    Docstring formatting.

    brenniebrennie

    single quotes.

    brenniebrennie

    blank line between these.

    brenniebrennie

    blank line between these.

    brenniebrennie
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/datagrid/grids.py
          djblets/gravatars/templatetags/tests.py
          djblets/cache/backend_compat.py
          djblets/util/compat/django/core/cache.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/datagrid/grids.py
          djblets/gravatars/templatetags/tests.py
          djblets/cache/backend_compat.py
          djblets/util/compat/django/core/cache.py
      
      
    2. djblets/gravatars/templatetags/tests.py (Diff revision 1)
       
       
      Show all issues
       'gravatar' imported but unused
      
    3. Show all issues
      Col: 1
       E302 expected 2 blank lines, found 0
      
    4. Show all issues
       undefined name 'InvalidCacheBackendError'
      
    5. Show all issues
       undefined name 'InvalidCacheBackendError'
      
    6. Show all issues
       undefined name 'parse_qsl'
      
    7. Show all issues
      Col: 42
       E226 missing whitespace around arithmetic operator
      
    8. 
        
    chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/datagrid/grids.py
          djblets/gravatars/templatetags/tests.py
          djblets/cache/backend_compat.py
          djblets/util/compat/django/core/cache.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/datagrid/grids.py
          djblets/gravatars/templatetags/tests.py
          djblets/cache/backend_compat.py
          djblets/util/compat/django/core/cache.py
      
      
    2. 
        
    david
    1. 
        
    2. djblets/datagrid/grids.py (Diff revision 2)
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      This will now fail if profile is None.

    3. djblets/util/compat/django/core/cache.py (Diff revision 2)
       
       
       
       
       
       
      Show all issues

      This docstring isn't in the right format.

      1. It's upstream from Django. I want to minimize what we touch there, to keep it easy to diff/update when we need to.

    4. Show all issues

      Single quotes.

    5. Show all issues

      Single quotes.

    6. 
        
    chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/datagrid/grids.py
          djblets/gravatars/templatetags/tests.py
          djblets/cache/backend_compat.py
          djblets/util/compat/django/core/cache.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/datagrid/grids.py
          djblets/gravatars/templatetags/tests.py
          djblets/cache/backend_compat.py
          djblets/util/compat/django/core/cache.py
      
      
    2. 
        
    brennie
    1. 
        
    2. Show all issues

      from __future__ import unicode_literals

      1. This file is an upstream Django file (anything in djblets.util.compat.django is upstream), so to keep behavior and content as close as possible, I'm not making any changes to this to match our codebase or to change behavior (such as forcing Unicode).

    3. djblets/util/compat/django/core/cache.py (Diff revision 3)
       
       
       
       
       
       
      Show all issues

      Docstring formatting.

    4. Show all issues

      single quotes.

    5. djblets/util/compat/django/core/cache.py (Diff revision 3)
       
       
       
      Show all issues

      blank line between these.

    6. djblets/util/compat/django/core/cache.py (Diff revision 3)
       
       
       
      Show all issues

      blank line between these.

    7. 
        
    david
    1. 
        
    2. djblets/util/compat/django/core/cache.py (Diff revision 3)
       
       
       
      Show all issues

      Can you expand this to say where it comes from? Also this should probably include django's LICENSE.

    3. 
        
    chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          djblets/datagrid/grids.py
          djblets/gravatars/templatetags/tests.py
          djblets/cache/backend_compat.py
          djblets/util/compat/django/core/cache.py
          djblets/util/compat/django/core/files/locks.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          djblets/datagrid/grids.py
          djblets/gravatars/templatetags/tests.py
          djblets/cache/backend_compat.py
          djblets/util/compat/django/core/cache.py
          djblets/util/compat/django/core/files/locks.py
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-0.9.x (e9dd302)