Split djblets.webapi.core into smaller modules.
Review Request #5899 — Created May 29, 2014 and submitted
Over time,
djblets.webapi.corehas 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 existingencoders.py, and all the response classes into
responses.py.The existing
djblets.webapi.corewill emit aDeprecationWarning, but
will continue to work as before.No logic has changed, with the exception of changing old-style
MyParent.function(self, ...)calls to usesuper()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 ofresources.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 incore.py.
| Description | From | Last Updated |
|---|---|---|
|
Col: 80 E501 line too long (80 > 79 characters) |
|
|
|
Col: 1 E302 expected 2 blank lines, found 1 |
|
|
|
Col: 17 E129 visually indented line with same indent as next logical line |
|
|
|
Col: 30 E711 comparison to None should be 'if cond is not None:' |
|
|
|
Col: 17 E129 visually indented line with same indent as next logical line |
|
-
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:
- Change Summary:
-
Made Review Bot happier.
- Commit:
-
981e8a9fd2753acd308303e88fbe9d57c370b4c6fc2e2a0b41c37f9ddbcf767467e27b9444515564
-
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: -
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: