The new Traits observe framework has a number of advantages and bugfixes compared to the older on_trait_change listeners. We should migrate the codebase to use the new framework wherever possible.
Because function signatures of observers are different from trait change handlers, we can't make the change in a completely automated way. As a result it is best if we do this in a series of steps to make review easier.
Further, to reduce errors and boilerplate, it makes sense to introduce standard ways to connect and disconnect dynamic observers (for example, via flagging standard metadata).
The new Traits
observeframework has a number of advantages and bugfixes compared to the olderon_trait_changelisteners. We should migrate the codebase to use the new framework wherever possible.Because function signatures of observers are different from trait change handlers, we can't make the change in a completely automated way. As a result it is best if we do this in a series of steps to make review easier.
Further, to reduce errors and boilerplate, it makes sense to introduce standard ways to connect and disconnect dynamic observers (for example, via flagging standard metadata).
@on_trait_changeusages to@observe(about 50 places it is used) (Convert on_trait_change decorators to observe decorators #864)on_trait_changeusages toobserve(about 200 places it is used)on_trait_changeusages that fit into standard frameworkon_trait_changeusageson_trait_changeusages