Introduce webapi compatibility fixes for Review Board 1.0.x and a modern Djblets.

Review Request #1485 — Created March 27, 2010 and submitted

Information

Review Board

Reviewers

Introduce webapi compatibility fixes for Review Board 1.0.x and a modern Djblets.

The Djblets webapi code is changing in many ways, and it breaks compatibility
with Review Board 1.0.x. Some changes are internal API changes, while some
are external (HTTP status codes). If someone using Review Board 1.0.x installs
a more recent Djblets on their system (for bug fixes, development, another
package that requires it, etc.), Review Board 1.0.x will break.

This change introduces some workarounds for the API changes:

1) We hard-code an HTTP status code of 200 for all errors.
2) All our view functions now take *args, **kwargs as parameters.
3) Handle the api_format kwarg smartly in @webapi_check_login_required.,
4) Specifically define api_format as a parameter in review_request_list and
   count_review_requests so that it's not passed down to the specified
   function for returning the list.
5) Our own ReviewBoardAPIEncoder now represents a User (as this is changing
   in Djblets) and we make sure ours runs first.

This will not be merged in to master. The master branch will already work
with the Djblets changes.
All unit tests pass now.
Loading...