Split djblets.webapi.core into smaller modules.

Review Request #5899 — Created May 29, 2014 and submitted

Information

Djblets
release-0.8.x
fc2e2a0...

Reviewers

Over time, djblets.webapi.core has grown, and contained classes better
suited for other modules. We even had a circular dependency due to the
way that things were split up.

This splits out all the encoder-related classes and registration logic
into the existing encoders.py, and all the response classes into
responses.py.

The existing djblets.webapi.core will emit a DeprecationWarning, but
will continue to work as before.

No logic has changed, with the exception of changing old-style
MyParent.function(self, ...) calls to use super() instead.

The only move I wasn't sure of was SPECIAL_PARAMS. I put it in
decorators.py, since the decorators depend on it and are the main place
where API parameters are processed. However, one part of resources.py
also uses it, just to help build a string. I think this move is okay,
but I'm open to ideas.

Djblets and RB unit tests pass. Note that I didn't update the imports in
RB, so this was going through the legacy imports in core.py.

Description From Last Updated

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 17 E129 visually indented line with same indent as next logical line

reviewbotreviewbot

Col: 30 E711 comparison to None should be 'if cond is not None:'

reviewbotreviewbot

Col: 17 E129 visually indented line with same indent as next logical line

reviewbotreviewbot
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        djblets/webapi/decorators.py
        djblets/webapi/core.py
        djblets/webapi/responses.py
        djblets/webapi/resources.py
        djblets/webapi/encoders.py
        djblets/webapi/auth.py
      Ignored Files:
    
    
  2. djblets/webapi/encoders.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  3. djblets/webapi/encoders.py (Diff revision 1)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  4. djblets/webapi/responses.py (Diff revision 1)
     
     
    Show all issues
    Col: 17
     E129 visually indented line with same indent as next logical line
    
  5. djblets/webapi/responses.py (Diff revision 1)
     
     
    Show all issues
    Col: 30
     E711 comparison to None should be 'if cond is not None:'
    
  6. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        djblets/webapi/decorators.py
        djblets/webapi/core.py
        djblets/webapi/responses.py
        djblets/webapi/resources.py
        djblets/webapi/encoders.py
        djblets/webapi/auth.py
      Ignored Files:
    
    
  2. 
      
chipx86
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        djblets/webapi/decorators.py
        djblets/webapi/core.py
        djblets/webapi/responses.py
        djblets/webapi/resources.py
        djblets/webapi/encoders.py
        djblets/webapi/auth.py
      Ignored Files:
    
    
  2. djblets/webapi/responses.py (Diff revision 2)
     
     
    Show all issues
    Col: 17
     E129 visually indented line with same indent as next logical line
    
  3. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        djblets/webapi/decorators.py
        djblets/webapi/core.py
        djblets/webapi/responses.py
        djblets/webapi/resources.py
        djblets/webapi/encoders.py
        djblets/webapi/auth.py
      Ignored Files:
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.8.x (8008ae3)