Split djblets.webapi.core into smaller modules.
Review Request #5899 — Created May 29, 2014 and submitted — Latest diff uploaded
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.