Make SignalHook disconnect properly from the signal when a sender was specified in the constructor
Review Request #6410 — Created Oct. 6, 2014 and submitted — Latest diff uploaded
The Signal.disconnect() method in Django uses a combination of the dispatch_uid and the sender as the lookup key for finding the signal receiver to remove. This means that if SignalHook used a sender in the connect() call, it must provide that same sender when calling disconnect() later.
This issue was causing ReviewBoard extensions that should have been unloaded to be kept alive and continue receiving signals, which in turn led to extension actions happening multiple times.
Added new unit test.