Add a signal for notifying when a registry is populating.
Review Request #10070 — Created July 5, 2018 and submitted
This introduces a
registry_populatingsignal, which allows code to
lazily register entries in the registry during its population phase.
This prevents an application from having to register custom entries at
some point in its initialization process, or to try to guess a good time
to do so before the registry might be used. Applications can simply
listen to this signal and register when fired.
The signal provides the usual
senderargument, which is the class of
the registry, and a
registryargument for the instance. To be truly
effective, subclasses of
EntryPointRegistry, etc. should
be used, so that the
sendercan always point to something specific.
Djblets and Review Board unit tests pass.
Tested with some new code in Review Board that uses this signal instead
of populating on initialization. Confirmed that the signal fired at the
appropriate time and the new information was registered.