Deprecate the type argument of review request signals

Review Request #8896 — Created April 12, 2017 and submitted

Barret Rennie
Review Board

This patch deprecates the type argument of the review_request_closed
and review_request_closing signals, due to shadowing the type
builtin. We still provide the type argument, but it is wrapped in a
lazy object that will emit a warning when casted to a unicode string. We
now include the close_type argument which takes the place of the old
type argument. Usages and unit tests have been updated for this new

Ran unit tests.

  • 0
  • 0
  • 7
  • 1
  • 8
Description From Last Updated
Barret Rennie
Barret Rennie
  2. this file isnt supposed to be in the diff.

Barret Rennie
David Trowbridge
  2. Typo in summary: rquest

Barret Rennie
Christian Hammond
  2. Sooo the difficulty here is that if an extension does:

    review_request.close(type=..., ...)

    then things are going to break. The problem is that if **kwargs is provided, and we try to check for it there, then it'll still break since close_type won't be supported.


    Not the end of the world, but would be nice to fix.

    Perhaps we could say that close() will, by default, close as submitted. Then we can do that and have a **kwargs that checks for type and overrides close_type?

    I think submitted is going to be far more common than discarded, so I wouldn't have a problem with this as a default.

  3. Can you pass these as keyword arguments? It'll help with readability a lot.

  4. reviewboard/reviews/models/ (Diff revision 3)

    Here, too.

  5. reviewboard/reviews/ (Diff revision 3)

    This should have a .. deprecated::

  6. reviewboard/reviews/ (Diff revision 3)

    Here, too.

  7. reviewboard/ (Diff revision 3)

    This would be great in Djblets :)

    1. Can we put this into another change later? I really wanna get this in.

Barret Rennie
Barret Rennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (9a02c1e)